2 releases
Uses new Rust 2024
| 1.0.0-beta.2 | Jul 13, 2026 |
|---|---|
| 1.0.0-beta.1 | Nov 26, 2025 |
#901 in Caching
22 downloads per month
Used in 3 crates
295KB
5.5K
SLoC
s5_registry
Iroh-based registry protocol for S5. This crate implements an RPC protocol to access and modify S5 registry entries over the Iroh network.
Features
RegistryServer: Exposes a localRedbRegistry(the default local storage backend froms5_core) over an Iroh endpoint.Client: RPC client for the registry protocol.RemoteRegistry: Adapter that implements thes5_core::RegistryApitrait using the RPC client. This allows remote registries to be used interchangeably with local ones in application code.
Protocol
The registry protocol uses irpc over Iroh.
- ALPN:
s5/registry/0 - Operations:
Get(key_type, key_data)->Option<StreamMessage>Set(StreamMessage)->Result<()>
Status
Platform Support
| Component | Native | WASM |
|---|---|---|
Client |
Yes | Yes |
RemoteRegistry |
Yes | Yes |
RegistryServer |
Yes | Yes |
MemoryRegistry |
Yes | Yes |
TeeRegistry |
Yes | Yes |
MultiRegistry |
Yes | Yes |
All components in this crate are WASM-compatible.
Registry Implementations
RemoteRegistry: Proxies to a remote peer viaClientMemoryRegistry: In-memory storage (useful for testing/caching)TeeRegistry: Writes to both local and remote registriesMultiRegistry: Fan-out writes to N backends with configurable write policy
Note: RedbRegistry (persistent local storage) is in the separate s5_registry_redb crate (native-only).
Key Types
StreamKey::PublicKeyEd25519([u8; 32])- Ed25519 public key for user identityStreamKey::Local([u8; 32])- Local-only identifierStreamKey::Blake3HashPin([u8; 32])- For pin metadata
Usage
use s5_registry::{Client, RemoteRegistry};
use iroh::Endpoint;
// Connect to a remote registry
let endpoint = Endpoint::builder().bind().await?;
let client = Client::connect(endpoint, remote_addr);
// Use as a RegistryApi
let registry = RemoteRegistry::connect(endpoint, remote_addr);
let msg = registry.get(&key).await?;
Dependencies
~43–85MB
~1.5M SLoC