ZyrisDocs

Crates and features

What each crate in zyris-protocol is for, which one to depend on, and the feature flags.

Depend on zyris

zyris is the whole stack behind one name. The runtime is re-exported at its root, and each layer above it is a module behind a feature:

PathFeatureCrateWhat it is
zyris::*—zyris-coreThe runtime: connection state machine, transports, announce and accept, the dial-and-reconnect loop, device-grant enrollment.
zyris::proto—zyris-protoWire types only. No I/O, no async.
zyris::capability—zyris-macrosThe #[zyris::capability] macro.
zyris::capscapszyris-capsThe standard capability catalogue. Declarations only.
zyris::p2pp2pzyris-p2pA transport that carries Zyris directly between two nodes.

zyris::Node and zyris_core::Node are one type. Depending on a layer directly and on zyris links nothing twice.

zyris also re-exports serde, serde_json, schemars and async_trait, so a crate can derive through zyris::serde without a dependency of its own.

Features

default = ["client", "hostname"], so cargo add zyris costs what the runtime alone does and needs no C compiler.

FeatureWhat it adds
client (default)The websocket dialer, Node::connect, and the reconnect loop behind Link.
hostname (default)zyris::machine_name() and NodeBuilder::name_from_hostname().
enrollThe device-grant flow ending in a Credential. Turns on tls-ring.
tls-ringThe ring TLS provider. Needs a C compiler.
tls-aws-lcThe aws-lc-rs TLS provider. Needs cmake too on most targets. Wins if both are on.
axumServe the protocol from an axum route — the accepting side.
testingIn-process duplex connections, for tests without a network.
capszyris::caps.
p2pzyris::p2p.
fullcaps, p2p and enroll.

Without a TLS provider a node cannot reach wss://. The dial fails with ConnectError::NoTlsProvider before a socket is opened. See Connecting.

Implementations

See Capability addons for dependency setup, composition with custom tools, platform requirements and migration from zyris-capkit.

Named directly, beside zyris. What a node implements is the node's own decision, so the face carries the declarations and not the implementations.

CrateImplementsNotes
zyris-fsfile_io — LocalFileIoPure Rust, over tokio::fs.
zyris-terminalterminal — PtyTerminalPure Rust, over portable-pty.
zyris-transferfile_transfer, peer_transferFeatures send and listen add the peer-to-peer halves.
zyris-screenscreen_capture — HostScreenCaptureNeeds display development packages on Linux.
zyris-inputinput — EnigoInputGit only: explicitly unpublished; registry packaging would not preserve its pinned enigo fork.

zyris-capkit is a temporary facade over these crates for code written before they were split, and will be removed. New code should use the crates above.

Deployment surfaces

CrateWhat it is
zyris-attaccaThe attacca_api capability Attacca announces to its nodes. Named directly rather than reached through zyris, because Attacca is one deployment, not the protocol. See Consuming attacca_api.

zyris-p2p

A transport over iroh QUIC that carries Zyris between two nodes without Attacca carrying file bytes. Discovery is separate from the data link; a configured iroh relay can still carry bytes when a direct connection is unavailable. Check the transfer receipt's direct flag rather than assuming every transfer avoids relays.

Trust helpers include fingerprint for comparing a key out of band, TofuStore for pins and PeerConfirmer for first-use decisions. They do not automatically impose the same policy on every transport user. The current transfer listener's first-use behavior differs from the sender's; see receiving trust. iroh is re-exported from the crate root, so an iroh major release is a breaking release of this crate.

Where to find the API

Every published crate has rustdoc on docs.rs. Those pages describe the released version; for main, run cargo doc --open in a checkout of zyris-protocol.

License

MIT or Apache-2.0, at your option.

On this page