SDK · Rust
Embed Beacons directly. No FFI tax.
The Rust SDK is the reference implementation. Every other Beacons SDK calls into the same crypto module compiled to WASM. The Rust crate is what beacons-agent uses internally — you get the same surface, no compatibility layer.
Install
# Cargo cargo add beacons-sdk # or, in Cargo.toml [dependencies] beacons-sdk = "0.1"
What you get
- async/await throughout (tokio + smol compatible)
- Same crate as beacons-agent — zero behavioral drift
- no_std build target for embedded peers
- WASM build for browser / Hives / Workers
Platforms: Linux · macOS · Windows · FreeBSD · iOS · Android · WASM · no_std
use beacons_sdk::{Client, Did, Fleet};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let client = Client::from_env()?;
let fleet = Fleet::parse("did:oas:acme:fleet:prod")?;
let me = Did::parse("did:oas:acme:agent:scribe-7")?;
let peer = client.fleet(&fleet)
.enroll(&me)
.await?;
println!("admitted in {:?}", peer.composite_verdict_duration());
Ok(())
}Parity
Identical surface in every language.
Every Beacons SDK targets the same set of operations. Cryptographic primitives (Ed25519, HKDF-SHA256, Blake3) come from a shared Rust WASM module so signatures produced in one language verify identically in another. The conformance suite at beacons-conformance exercises cross-language vectors on every release.