rocksky/core

Native core bindings for Rocksky.

Typed externals over the rocksky_erl NIF package (the shared Rust core, rocksky-sdk): AppView reads, record writes (scrobble fan-out, like, follow, shout), and the identity hashes shared across every Rocksky SDK. This is the write + dedup side; the top-level rocksky module is the read/HTTP side.

Envelope calls return Dynamic — an {ok, value} / {error, message} tuple with binary-keyed maps (the wire shape); decode with gleam/dynamic.

Types

An opaque authenticated-agent handle (a NIF resource freed by the BEAM GC).

pub type Agent =
  dynamic.Dynamic

Values

pub fn artist_hash(album_artist: String) -> String

Identity hash of an artist.

pub fn follow(
  agent: dynamic.Dynamic,
  did: String,
) -> dynamic.Dynamic

Follow an account by DID.

pub fn global_stats(base: String) -> dynamic.Dynamic

Platform-wide totals. base overrides the AppView URL (“” = default).

pub fn like(
  agent: dynamic.Dynamic,
  uri: String,
  cid: String,
) -> dynamic.Dynamic

Like a record by strong reference.

pub fn login(
  session_path: String,
  identifier: String,
  password: String,
) -> dynamic.Dynamic

Log in with an app password, persisting the session at session_path.

pub fn profile(actor: String, base: String) -> dynamic.Dynamic

An actor’s detailed profile. base overrides the AppView URL (“” = default).

pub fn refresh_session(agent: dynamic.Dynamic) -> dynamic.Dynamic

Proactively refresh the session (keep-alive).

pub fn scrobbles(
  actor: String,
  limit: Int,
  offset: Int,
  base: String,
) -> dynamic.Dynamic

An actor’s scrobbles, newest first. base overrides the AppView URL.

pub fn shout(
  agent: dynamic.Dynamic,
  subject_uri: String,
  subject_cid: String,
  message: String,
) -> dynamic.Dynamic

Post a shout on a subject.

pub fn song_hash(
  title: String,
  artist: String,
  album: String,
) -> String

Identity hash of a song — identical across every Rocksky SDK.

pub fn top_tracks(
  limit: Int,
  offset: Int,
  base: String,
) -> dynamic.Dynamic

Platform-wide top tracks chart. base overrides the AppView URL.

Search Document