1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! Weirdnet service framework: one server, many apps.
//!
//! A server exposes typed request/response [`Service`]s and live [`Hub`] feeds. Apps (desktop,
//! terminal, mobile through a Rust bridge, MCP) connect over Weirdnet streams, present their
//! [`Credentials`] once per stream, and every request and subscription is checked by an
//! [`Authorize`] hook before it runs.
//!
//! - [`service`]: request/response sessions. A session is one stream: a `Hello` with the
//! caller's credentials, then any number of concurrent calls, each with an id, each
//! authorized on its own [`Access`] (permission and resource), cancellable.
//! - [`feed`]: live topic streams. A [`Hub`] keeps each topic's state and a sequence number;
//! a subscriber gets a snapshot then deltas, resumes from a [`Position`] after a reconnect
//! (or gets a fresh snapshot when the gap is too old), and a slow subscriber is coalesced or
//! re-snapshotted instead of stalling the publisher.
//! - [`auth`]: the [`Authorize`] hook, [`Caller`], [`Access`], [`Admitted`] and combinators.
//! The `roster` feature adds [`RosterAuth`](roster::RosterAuth) (the user's linked devices
//! and their device-role grants); the `access` feature adds
//! [`MembershipAuth`](access::MembershipAuth) (owner-signed memberships and
//! `weirdnet-access` roles).
//! - [`ProtocolId`]: versioned protocol ids such as `/myapp/api/2`.
//! - The `net` feature (default) serves all of this on a `weirdnet-net` node
//! ([`Server`](net::Server)) and dials it ([`NetDialer`](net::NetDialer), [`Client`]).
//!
//! Everything below the `net` feature is transport-neutral: a [`Channel`] is any ordered,
//! reliable message channel, and [`memory_pair`] gives two connected ends for tests.
//!
//! Messages are CBOR. The [protocol notes](https://github.com/WeirdBrains/weirdnet-service/blob/main/docs/protocol.md)
//! describe the wire format, and the [design notes](https://github.com/WeirdBrains/weirdnet-service/blob/main/docs/design.md)
//! explain the choices.
pub use ;
pub use ;
pub use Client;
pub use ServiceError;
pub use ;
pub use ;
pub use ;