Skip to main content

Crate ping_core

Crate ping_core 

Source
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
tracing field 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::Storage as the ping_mls_store::AsyncBlobStore the 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§

AdmitChatOutcome
Per-chat result reported by MessagingClient::admit_device_to_chats.
ClientConfig
MessagingClient

Enums§

AdmitChatStatus
StorageBackend
[CR-4] re-export so hosts can build ClientConfig { storage_backend: … } without pulling ping_mls_store in directly. AsyncBlobStore is the async single-blob trait WASM hosts implement to back StorageBackend::IndexedDb; BlobFuture is the matching future-type helper. Where the persistent provider checkpoints MemoryStorage to. Selected at MessagingClient::init time 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 2 after the window closes; until then it stays at 1 so we keep accepting messages produced by un-updated senders.

Traits§

AsyncBlobStore
[CR-4] re-export so hosts can build ClientConfig { storage_backend: … } without pulling ping_mls_store in directly. AsyncBlobStore is the async single-blob trait WASM hosts implement to back StorageBackend::IndexedDb; BlobFuture is 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 the MemoryStorage HashMap inside that slab.

Type Aliases§

BlobFuture
[CR-4] re-export so hosts can build ClientConfig { storage_backend: … } without pulling ping_mls_store in directly. AsyncBlobStore is the async single-blob trait WASM hosts implement to back StorageBackend::IndexedDb; BlobFuture is the matching future-type helper. Future returned by AsyncBlobStore methods. Mirrors the Send-bound pattern from ping_core::storage::StorageFuture: on native targets the future must cross tokio threads, on WASM the runtime is single-threaded and JsFuture is !Send.