A decentralized music tracking and discovery platform built on AT Protocol 🎵
rocksky.app
spotify
atproto
lastfm
musicbrainz
scrobbling
listenbrainz
3.0 kB
74 lines
1[package]
2name = "rocksky-sdk"
3version = "0.6.1"
4description = "Official Rust SDK for Rocksky — a music scrobbling & discovery platform on the AT Protocol"
5authors.workspace = true
6edition.workspace = true
7license = "MIT"
8repository.workspace = true
9keywords = ["atproto", "rocksky", "scrobble", "bluesky", "sdk"]
10categories = ["api-bindings"]
11
12[dependencies]
13# atproto client stack (identity, sessions, XRPC, OAuth).
14jacquard = { version = "0.12", default-features = false, features = [
15 "api",
16 "dns",
17 "derive",
18 "cache",
19 "loopback",
20] }
21jacquard-common = "0.12"
22# Needed by the generated app.rocksky.* bindings (lexicon schema types + derives).
23jacquard-lexicon = "0.12"
24jacquard-derive = "0.12"
25
26# async runtime primitives (the auth mutex) + HTTP for the read-only AppView client.
27tokio = { version = "1", features = ["sync", "macros", "rt-multi-thread", "time"] }
28reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "json", "stream"] }
29
30serde = { version = "1", features = ["derive"] }
31serde_json = "1"
32futures = "0.3"
33thiserror = "2"
34chrono = { version = "0.4", features = ["clock"] }
35smol_str = { version = "0.3", features = ["serde"] }
36sha2 = "0.10"
37tracing = "0.1"
38
39# --- dedup feature: local repo mirror for duplicate prevention ---
40# An embedded RocksDB index built from the user's repo CAR (com.atproto.sync.getRepo),
41# parsed with the ipld stack already in the workspace lock. All optional so the
42# base SDK stays light and avoids the RocksDB C++ build unless dedup is enabled.
43# Pure-Rust embedded KV for the dedup index — no libclang/C++ toolchain, so it
44# cross-compiles to every FFI target (incl. the BSDs) unlike RocksDB.
45redb = { version = "2", optional = true }
46serde_ipld_dagcbor = { version = "0.6", optional = true }
47ipld-core = { version = "0.4", optional = true }
48cid = { version = "0.11", optional = true }
49serde_bytes = { version = "0.11", optional = true }
50
51# --- jetstream feature: keep the dedup index live off the Bluesky firehose ---
52tokio-tungstenite = { version = "0.26.2", optional = true, features = [
53 "tokio-rustls",
54 "rustls-tls-webpki-roots",
55] }
56
57[features]
58default = ["oauth", "dns", "appview"]
59# Browser + loopback OAuth login (jacquard oauth/loopback already pulled above).
60oauth = []
61# DNS-based handle resolution.
62dns = []
63# The unauthenticated public-read AppView client (usable without any session).
64appview = []
65# Duplicate-prevention index: mirror the user's repo into RocksDB and check it
66# before writing scrobble / song / album / artist records to the PDS.
67dedup = ["dep:redb", "dep:serde_ipld_dagcbor", "dep:ipld-core", "dep:cid", "dep:serde_bytes"]
68# Keep the dedup index continuously hydrated from the Bluesky Jetstream firehose
69# (all four servers at once), filtered to `app.rocksky.*` for the user's DID.
70jetstream = ["dedup", "dep:tokio-tungstenite"]
71
72[dev-dependencies]
73tracing-subscriber = { version = "0.3", features = ["env-filter"] }
74tempfile = "3"