Skip to main content

libfcp_core/
lib.rs

1// Copyright Nixort <https://github.com/Nixort> 2026.
2//
3// License: GNU General Public License v3.0 only.
4// You can find the license file in the project root.
5//
6// Federated CFR Connect Protocol (FCP).
7
8//! Transport-agnostic FCP federation connection-control core.
9//!
10//! Applications use [`Connection`] to bind one WebRTC negotiation attempt to a
11//! federation and endpoint keys. The core neither parses SDP/ICE nor CFR
12//! payloads; platform adapters and the CFR bridge own those separate concerns.
13
14#![cfg_attr(not(feature = "std"), no_std)]
15#![forbid(unsafe_code)]
16#![deny(missing_docs)]
17#![warn(clippy::pedantic)]
18#![allow(clippy::must_use_candidate, clippy::missing_errors_doc)]
19
20extern crate alloc;
21
22mod configuration;
23mod connection;
24mod envelope;
25mod error;
26mod identity;
27mod types;
28
29pub use configuration::{
30    FederationConfiguration, FederationMember, SignedFederationConfiguration,
31    FEDERATION_CONFIG_MARKER, FEDERATION_CONFIG_VERSION, MAX_FEDERATION_MEMBERS,
32};
33pub use connection::{Action, Connection, ControlChannelConfig, Phase, CONTROL_CHANNEL};
34pub use envelope::{Body, Envelope, Kind};
35pub use error::Error;
36pub use identity::{
37    EndpointIdentity, EndpointSigner, SigningIdentity, ML_DSA_65_PUBLIC_KEY_BYTES,
38    ML_DSA_65_SIGNATURE_BYTES,
39};
40pub use types::{
41    AttemptId, CloseCode, EndpointKey, EnvelopeId, FederationId, WebRtcBinding, FCP_WIRE_MARKER,
42    FCP_WIRE_VERSION, MAX_CANDIDATE_BYTES, MAX_CFR_CONTROL_BYTES, MAX_DESCRIPTION_BYTES,
43    MAX_ENVELOPE_BYTES, MAX_SEEN_ENVELOPES, PROTOCOL_ID,
44};