Skip to main content

gbp_stack/
lib.rs

1//! Top-level facade for the [Group Protocol Stack].
2//!
3//! Most users should depend on this single crate; the layered architecture
4//! is an implementation detail that is exposed for users who only need a
5//! subset of the stack.
6//!
7//! # Layers
8//!
9//! ```text
10//!   ┌────────────────────────────────────────────────────────┐
11//!   │  Layer 4 — orchestration                               │
12//!   │      gbp-node  →  gbp-stack  →  gbp-stack-ffi          │
13//!   ├────────────────────────────────────────────────────────┤
14//!   │  Layer 3 — security & transport                        │
15//!   │      gbp-mls  ·  gbp-transport  ·  gbp-sframe          │
16//!   ├────────────────────────────────────────────────────────┤
17//!   │  Layer 2 — sub-protocols on top of GBP                 │
18//!   │      gtp-protocol · gap-protocol · gsp-protocol        │
19//!   ├────────────────────────────────────────────────────────┤
20//!   │  Layer 1 — base protocol                               │
21//!   │      gbp-protocol (GbpFrame, ControlMessage, …)        │
22//!   ├────────────────────────────────────────────────────────┤
23//!   │  Layer 0 — vocabulary                                  │
24//!   │      gbp-core (StreamType, Flags, FSM, codes)          │
25//!   └────────────────────────────────────────────────────────┘
26//! ```
27//!
28//! [Group Protocol Stack]: https://github.com/F000NKKK/Group-Protocol-Stack
29
30#![deny(missing_docs)]
31
32pub use gap;
33pub use gbp;
34pub use gbp_core as core;
35pub use gbp_mls as mls;
36pub use gbp_node as node;
37pub use gbp_transport as transport;
38pub use gsp;
39pub use gtp;
40
41pub use gbp::{ControlMessage, ErrorObject, GbpFrame};
42
43pub use gap::{GapAccept, GapClient, GapError, GapPayload};
44pub use gsp::{CapabilitiesNegotiator, GspAccept, GspClient, GspError, GspSignal};
45pub use gtp::{GtpAccept, GtpClient, GtpError, GtpMessage};
46
47pub use gbp_core::{
48    BoundedSeen, ControlOpcode, ErrorClass, GbpFlags, GroupId, MemberId, NodeState, PayloadCodec,
49    SignalType, StreamType, TransitionState, codes, timeouts,
50};
51
52pub use gbp_mls::{MlsContext, ProcessedKind, StreamLabel, label_for};
53
54pub use gbp_node::{DeliveredPayload, Event, GroupNode, NodeError, OutboundFrame, Sealer};
55
56pub use gbp_transport::{MAX_FRAME, WireError, read_blob, read_frame, write_blob, write_frame};
57
58pub use gbp_sframe;
59pub use gbp_sframe::{
60    CipherSuite, SFrameDecryptor, SFrameEncryptor, SFrameError, SFrameHeader, SFrameSession,
61};