Skip to main content
rocksky-sdk is the Rust SDK and the shared engine behind every other Rocksky SDK. Built on jacquard, it mirrors Bluesky’s @atproto/api: RockskyAgent wraps a session and exposes high-level write verbs; reads go through the unauthenticated AppView. It also ships an optional dedup index and Jetstream real-time sync.

Install

The dedup and jetstream features are optional (they pull in RocksDB + the firehose client).

Quickstart

API

Reads — AppView: the full app.rocksky.* read surface. Basics: profile, scrobbles, songs, albums, artists, feed, search, top_artists, top_tracks, global_stats. Catalog & relations: catalog_albums, catalog_artists, catalog_songs, album_tracks, artist_albums, artist_tracks, loved_songs, scrobble_feed, scrobble (single by uri), follows, followers, known_followers. Raw-JSON detail/long-tail methods: album, artist, song, playlists, playlist, stats, wrapped, scrobbles_chart, recommendations, neighbours, shouts, and more. get(nsid, &params) is the universal escape hatch — calls any read query by nsid and returns raw serde_json::Value; every named method is sugar over it. match_song(title, artist, mb_id, isrc) resolves a bare title + artist into full canonical metadata. Attach a bearer token for auth-gated queries with AppView::new(base).with_token(token) (or set_token). Date-window charts: top_tracks_interval / top_artists_interval take a typed DateIntervalAllTime, LastDays(n), LastWeeks(n), LastMonths(n), LastYears(n), or Range { start, end }; top_tracks / top_artists remain all-time shorthands.
Writes — RockskyAgent: scrobble (fan-out from full metadata), scrobble_match(&ScrobbleMatch { .. }) (resolves metadata via match_song, then the same fan-out; title/artist required, album/mb_id/isrc/timestamp optional), create_song / create_album / create_artist, like / unlike, follow / unfollow, shout / reply_shout, set_now_playing / clear_now_playing. App-password + loopback OAuth login. Identity hashes: rocksky_sdk::dedup::{song_hash, album_hash, artist_hash}.

Duplicate prevention & real-time sync

With the dedup feature, attach a RocksDB-backed index; with jetstream, keep it live off the firehose: