Skip to main content

Crate rusty_esp_iroh_host

Crate rusty_esp_iroh_host 

Source
Expand description

rusty_esp_iroh-host — a Janus node and its client over iroh 1.x, in std.

The same code runs on a laptop, a Pi and, as Track A, on ESP-IDF; only the key store and the radio bring-up differ (rusty_esp_iroh-esp). TLS is pure Rust throughout — rustls with the rustls-rustcrypto provider n0 proved on ESP32 — so there is no ring and no aws-lc anywhere in the graph.

modulewhat
identitythe device key (P-256, mID) and the endpoint key (ed25519, iroh) from the Kv seam, bound by a signed core::binding::Binding
nodea Janus node: janus/echo/1, janus/rpc/1, janus/media/1 and mata-oem-sidecar/rpc/1 on one endpoint
clientdial by ticket: echo, rpc with an mID assertion, sidecar JSON, media subscribe with a loss counter
cryptothe QUIC-capable rustls-rustcrypto provider (AES-128-GCM + X25519), vendored from n0’s ESP32 examples

Re-exports§

pub use client::Client;
pub use error::HostError;
pub use identity::NodeIdentity;
pub use node::BootStats;
pub use node::Extras;
pub use node::MediaSource;
pub use node::NeighbourSource;
pub use node::Node;
pub use node::NodeConfig;
pub use rusty_esp_iroh_core as core;

Modules§

client
The client: dial a Janus node by ticket and speak its four protocols.
crypto
A QUIC-capable rustls CryptoProvider over rustls-rustcrypto — pure Rust, AES-128-GCM + X25519 only.
error
One error for the host side.
identity
Two keys, one identity: the P-256 device key (did:mata, from rusty_esp_mid) and the ed25519 endpoint key iroh requires, both living in the Kv seam (mid.key, iroh.key), bound together by a Binding the device key signs.
mjpeg
Real MJPEG for janus/media/1.
node
A Janus node: one iroh endpoint, four ALPNs.

Functions§

configure_reach
Apply the reach tier to an endpoint builder: LAN-direct (relay disabled) or, with the relay feature, n0’s relays + pkarr through [relay::apply]. Asking for relay without the feature is an error, not a silent downgrade.
now_unix
Unix seconds now, when the clock looks set (after Sept 2020); None before SNTP on a chip, which the assertion and adoption checks accept.