Skip to main content

rift_core/
lib.rs

1//! Core types and helpers that are shared across the Rift stack.
2//!
3//! This crate is intentionally small and dependency-light so it can be reused by
4//! native clients, SDKs, and (now) WASM targets. It provides:
5//! - identity/key handling
6//! - invite encoding/decoding
7//! - message and channel identifiers
8//! - Noise/E2EE key utilities
9
10/// Error types used by the core crate.
11pub mod error;
12/// Identity generation and persistence helpers.
13pub mod identity;
14/// On-disk keystore helpers for identity rotation and discovery.
15pub mod keystore;
16/// Invite creation and parsing helpers.
17pub mod invite;
18/// Peer/channel/message ID helpers.
19pub mod message;
20/// Noise protocol helpers (session setup).
21pub mod noise;
22/// E2EE helper functions (X25519 + signatures + HKDF).
23pub mod e2ee;
24
25// Re-exports keep core consumers from needing to know the internal module layout.
26pub use error::CoreError;
27pub use identity::Identity;
28pub use identity::peer_id_from_public_key_bytes;
29pub use keystore::{KeyStore, KeyStoreError};
30pub use invite::{decode_invite, encode_invite, generate_invite, Invite};
31pub use message::{ChannelId, MessageId, PeerId};