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:
| Path | Feature | Crate | What it is |
|---|---|---|---|
zyris::* | — | zyris-core | The runtime: connection state machine, transports, announce and accept, the dial-and-reconnect loop, device-grant enrollment. |
zyris::proto | — | zyris-proto | Wire types only. No I/O, no async. |
zyris::capability | — | zyris-macros | The #[zyris::capability] macro. |
zyris::caps | caps | zyris-caps | The standard capability catalogue. Declarations only. |
zyris::p2p | p2p | zyris-p2p | A 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.
| Feature | What 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(). |
enroll | The device-grant flow ending in a Credential. Turns on tls-ring. |
tls-ring | The ring TLS provider. Needs a C compiler. |
tls-aws-lc | The aws-lc-rs TLS provider. Needs cmake too on most targets. Wins if both are on. |
axum | Serve the protocol from an axum route — the accepting side. |
testing | In-process duplex connections, for tests without a network. |
caps | zyris::caps. |
p2p | zyris::p2p. |
full | caps, 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.
| Crate | Implements | Notes |
|---|---|---|
zyris-fs | file_io — LocalFileIo | Pure Rust, over tokio::fs. |
zyris-terminal | terminal — PtyTerminal | Pure Rust, over portable-pty. |
zyris-transfer | file_transfer, peer_transfer | Features send and listen add the peer-to-peer halves. |
zyris-screen | screen_capture — HostScreenCapture | Needs display development packages on Linux. |
zyris-input | input — EnigoInput | Git 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
| Crate | What it is |
|---|---|
zyris-attacca | The 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.