Expand description
rusty_esp_iroh-core — the Janus mesh protocols, with no sockets in them.
iroh itself runs on Track A only (rusty_esp_iroh-esp) and on hosts
(rusty_esp_iroh-host). What every node, host, bridge and no_std
neighbour must agree on lives here, testable on a laptop:
| module | what |
|---|---|
alpn | the ALPN strings and frame limits |
ticket | the QR / serial rendezvous ticket: endpoint id, DID, relay, addresses — janus1… text, no heap |
binding | the device key’s signature over its iroh EndpointId — how a DID resolves to an endpoint |
assertion | the caller’s mID assertion every RPC carries (the kms nonce-envelope shape) |
rpc | janus/rpc/1: postcard requests and responses with length-prefixed framing, and the authorisation rule |
media | janus/media/1: subscribe message and the packet header |
sidecar | mata-oem-sidecar/rpc/1: the home computer’s existing JSON RPC and mDNS TXT contract, answered by a device |
Rules (from the Janus mission plan): no_std by default; alloc is a
feature; nothing here allocates on a per-packet path except the postcard
codec, which is what alloc is for; every type that crosses to another
Janus package comes from rusty_esp_core or rusty_esp_mid-core;
forbid(unsafe).
Re-exports§
pub use binding::Binding;pub use ticket::Ticket;pub use rusty_esp_core as esp_core;pub use rusty_esp_mid_core as mid;
Modules§
- alpn
- The protocol names and the frame limits every side agrees on.
- assertion
- The caller’s mID assertion every
janus/rpc/1request carries. - base32
- RFC 4648 base32, lowercase, unpadded — the alphabet iroh’s own tickets use — over caller buffers.
- binding
- The DID-to-endpoint binding: the device’s P-256 key signs its ed25519
iroh
EndpointId, so anyone holding the DID can check that an endpoint is that device — the mesh notes’ “publish the endpoint on the identity anchor”, and the family’s only use of ed25519 (iroh requires it). - media
janus/media/1: a subscriber opens the connection, sends oneSubscribeframe on a bi-stream, and the device answers with packets — each a fixed 24-bytePacketHeaderfollowed by the payload — as QUIC datagrams when they fitcrate::alpn::MAX_MEDIA_DATAGRAMand as uni-streams otherwise. The header is whatrusty_esp_video’s andrusty_esp_audio’s packets already carry: a sequence number, the device-monotonic timestamp, a codec tag and flags.- ota
- OTA over iroh (N5): a maker-signed image manifest, the bytes streamed behind it, and the two-slot sink that makes a bad image harmless.
- prelude
- The names a firmware or a host wants in scope.
- rpc
janus/rpc/1: one request and one response per bi-stream, each a length-prefixed postcard frame; every request may carry the caller’s mIDAssertion, and the device’s authorisation rule decides what an unauthenticated caller may ask.- sidecar
mata-oem-sidecar/rpc/1and_mata-oem-sidecar._tcp.local.: the home computer’s existing contract for a maker’s box, answered by a Janus device so it shows up in the owner app on day one with no home-computer change. Shapes and field names followmata-oem-sidecar(hardware-deployer-core::wire,hardware-deployer-api::{rpc, mesh}) and whathome-computer-pair-client::discoveryreads back.- ticket
- The rendezvous ticket a device shows as a QR code or prints on serial:
how to dial it (iroh endpoint id, optional relay and direct addresses)
and who it is (its
did:mata). No heap; fixed-size fields.
Constants§
- VERSION
- Crate version, for capability manifests and logs.