You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rust client for the Swarm Bee API.
Async-first, MSRV 1.85, forbid(unsafe_code).
The functional target is parity with bee-js (canonical TypeScript
client) and bee-go (typed Go port). bee-go is the primary reference
for shape and behavior since the typed-language → typed-language
mapping is direct; bee-js is the source of truth for wire-format edge
cases.
Quick start
use bee::Client;#[tokio::main]asyncfnmain() -> Result<(), bee::Error>{let client = Client::new("http://localhost:1633")?;let health = client.debug().health().await?;println!("bee {} api {}", health.version, health.api_version);Ok(())}
Run the live-Bee smoke test:
BEE_URL=http://localhost:1633 cargo run --example integration-check
Set BEE_BATCH_ID=<hex> to reuse an existing postage batch (the
first usability of a fresh batch on Sepolia takes minutes).
reqwest (rustls-tls) for HTTP, tokio-tungstenite for websockets
k256 for secp256k1, sha3 for keccak256
thiserror for typed errors, serde for JSON
num-bigint for BZZ/DAI / chain-state amounts
tar for in-memory collection uploads
Migration cheat sheet
bee-js / bee-go callers should find the bee-rs surface familiar.
Each row gives the bee-js method, the bee-go method, and the bee-rs
equivalent. All bee-rs methods are async.
Both have from_string(label) keccak256-derived constructors
BZZ / DAI
bee::swarm::Bzz / Dai
Fixed-point on BigInt, Display + FromStr
Duration
bee::swarm::BeeDuration
Duration::parse("1d 4h 5m 30s")?
Size
bee::swarm::Size
Decimal base (1 kB = 1000 B), Size::parse("28MB")?
Resource locator
bee::manifest::ResourceLocator
Referenceor<label>.eth
Stability
The crate is currently 0.x — breaking changes are allowed in minor
bumps. The 1.0 line will follow once the live Bee soak (P4) and
the integration-check coverage match bee-go's. See
CHANGELOG.md and RELEASE.md.
About
Rust client library for connecting to Bee decentralised storage