Expand description
Platform-agnostic core for the Ping messaging SDK.
This crate owns OpenMLS state machines and exposes a transport-/storage-agnostic API.
Native and WASM bindings are thin wrappers around MessagingClient.
Re-exports§
pub use clock::Hlc;pub use conversation::Conversation;pub use conversation::ConversationId;pub use conversation::ConversationMeta;pub use conversation::MemberInfo;pub use device::CatchupAppEventEntry;pub use device::CatchupConversationEntry;pub use device::CatchupSnapshot;pub use device::DeviceId;pub use device::DeviceInfo;pub use device::GroupSnapshotEntry;pub use device::GroupStateSnapshot;pub use device::LinkingTicket;pub use device::CATCHUP_SNAPSHOT_HARD_CAP;pub use device::CATCHUP_SNAPSHOT_SOFT_CAP;pub use device::CATCHUP_SNAPSHOT_VERSION;pub use device::GROUP_SNAPSHOT_HARD_CAP;pub use device::GROUP_SNAPSHOT_SOFT_CAP;pub use device::GROUP_SNAPSHOT_VERSION;pub use error::Error;pub use error::Result;pub use identity::Identity;pub use identity::UserId;pub use message::IncomingMessage;pub use message::MessageEnvelope;pub use message::MessageKind;pub use message::OutgoingMessage;pub use storage::Storage;pub use storage_blob::storage_as_blob_store;pub use sync::SyncCursor;pub use transport::Transport;pub use transport::TransportSubscription;
Modules§
- clock
- Hybrid Logical Clock — Kulkarni et al. 2014.
- codec
- CBOR encode/decode for wire types.
- conversation
- Conversation state — wraps an OpenMLS
MlsGroup. - device
- Device model — every install of the SDK is one device. Devices are first-class MLS members.
- error
- identity
- User identity. A user has one long-term Ed25519 key and many devices.
- log_
filter tracingfield filter that drops sensitive field names before they reach the subscriber.- message
- Wire envelope shared by every transport.
- storage
- Storage trait — implemented by hosts. A namespaced, async key-value interface.
- storage_
blob - Adapter that exposes a host-provided
crate::Storageas theping_mls_store::AsyncBlobStorethe persistent provider needs. - sync
- Per-conversation sync state. See
docs/SYNC_PROTOCOL.md. - transport
- Transport trait — the SDK never opens a socket. Hosts implement this against their backend.
Structs§
- Admit
Chat Outcome - Per-chat result reported by
MessagingClient::admit_device_to_chats. - Client
Config - Messaging
Client
Enums§
- Admit
Chat Status - Storage
Backend - [CR-4] re-export so hosts can build
ClientConfig { storage_backend: … }without pullingping_mls_storein directly.AsyncBlobStoreis the async single-blob trait WASM hosts implement to backStorageBackend::IndexedDb;BlobFutureis the matching future-type helper. Where the persistent provider checkpointsMemoryStorageto. Selected atMessagingClient::inittime via [ping_core::ClientConfig::storage_backend].
Constants§
- WIRE_
VERSION - Wire-format version. Bumped only on incompatible envelope changes.
- WIRE_
VERSION_ MIN_ ACCEPTED - The lowest envelope version that receivers will accept during the CR-6 dual-accept
transition. Bumped to
2after the window closes; until then it stays at1so we keep accepting messages produced by un-updated senders.
Traits§
- Async
Blob Store - [CR-4] re-export so hosts can build
ClientConfig { storage_backend: … }without pullingping_mls_storein directly.AsyncBlobStoreis the async single-blob trait WASM hosts implement to backStorageBackend::IndexedDb;BlobFutureis the matching future-type helper. Async single-blob storage. Reads + writes the entire MLS snapshot as one opaque byte slab; the provider takes care of (de)serialising theMemoryStorageHashMap inside that slab.
Type Aliases§
- Blob
Future - [CR-4] re-export so hosts can build
ClientConfig { storage_backend: … }without pullingping_mls_storein directly.AsyncBlobStoreis the async single-blob trait WASM hosts implement to backStorageBackend::IndexedDb;BlobFutureis the matching future-type helper. Future returned byAsyncBlobStoremethods. Mirrors theSend-bound pattern fromping_core::storage::StorageFuture: on native targets the future must cross tokio threads, on WASM the runtime is single-threaded andJsFutureis!Send.