Skip to main content

Crate rusty_esp_iroh

Crate rusty_esp_iroh 

Source
Expand description

rusty_esp_iroh — The MATA mesh on the chip: an iroh endpoint on ESP32 (std/ESP-IDF track), Janus ALPN protocols (rpc, media, telemetry), a host client, and a bridge that fronts no_std nodes on the mesh. Replaces cloud-IoT device SDKs.

This is the facade: it re-exports the no_std core and exposes the chip backends under esp. Depend on this crate; reach into the sub-crates only when you are building a backend.

Part of Janus (Remade With Rust). Plan: docs/plans/rusty_esp_iroh.md.

Modules§

alpn
The protocol names and the frame limits every side agrees on.
assertion
The caller’s mID assertion every janus/rpc/1 request 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).
esp
Chip backends (esp-hal for Track B, esp-idf for Track A).
esp_core
rusty_esp_core — the shared vocabulary of the Janus ESP family.
media
janus/media/1: a subscriber opens the connection, sends one Subscribe frame on a bi-stream, and the device answers with packets — each a fixed 24-byte PacketHeader followed by the payload — as QUIC datagrams when they fit crate::alpn::MAX_MEDIA_DATAGRAM and as uni-streams otherwise. The header is what rusty_esp_video’s and rusty_esp_audio’s packets already carry: a sequence number, the device-monotonic timestamp, a codec tag and flags.
mid
rusty_esp_mid-core — MATA mID on the chip, the pure core.
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 sketch or firmware 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 mID Assertion, and the device’s authorisation rule decides what an unauthenticated caller may ask.
sidecar
mata-oem-sidecar/rpc/1 and _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 follow mata-oem-sidecar (hardware-deployer-core::wire, hardware-deployer-api::{rpc, mesh}) and what home-computer-pair-client::discovery reads 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.

Structs§

Binding
A signed binding.
Ticket
A rendezvous ticket.

Constants§

VERSION
Crate version, for capability manifests and logs.