Select the source and profile
For the contracts on this page, use the audited revision explicitly:Cargo.toml
preparing phase with no baseline and MSRV 1.95. It does not establish a general 1.x stability promise or approve every available feature combination for production. Keep optional test and benchmark features out of the production compatibility assumptions.
Construct extensible types
Start protobuf messages withDefault and assign the fields you need. When modifying an existing value, clone it and change the intended fields so the remaining modeled data survives. This construction works at the installation pin. Public generated messages, views, enums and oneofs are now non-exhaustive. External struct literals, including literals with ..Default::default(), no longer compile. Owned messages also expose generated with_* setters. See protobuf construction.
.. in non-exhaustive struct patterns and a fallback arm for non-exhaustive enums. Merged extensible classifications include JID Server, media HostType, DisconnectReason, MEX capping classifications, and app-state Collection, Scope and IndexPart. Construct host-defined app-state schemas with Schema::new. TransportEvent remains closed.
Rust exhaustiveness does not define protocol parsing. Unknown JID namespaces still fail parsing. HostType::Other preserves its wire spelling. The audited main generator disables unknown protobuf field preservation. Do not treat decoding and re-encoding, or a JSON round trip, as lossless storage of an unrecognized payload. Unknown app-state operations remain rejected before state mutation.
Rust names, protobuf tags and serialized names are separate compatibility concerns. Do not manually edit generated Rust to accommodate an upstream schema change.
For passkey hosts, construct Assertion with Assertion::new(assertion_json, credential_id). That constructor neither signs nor validates an assertion. Obtain AssertionRequest through parse_request_options and read its public fields. Do not construct AssertionRequest or SignalSessionInfo with external literals.
Preserve host extension points
Replace direct use of built-in stanza handlers, their router, the pairing IQ dispatcher, the PDO response dispatcher, unified-session telemetry internals or socketSendJob with the documented client operations and extension traits. These implementation entry points are no longer public production contracts.
Plugins, interceptors, custom EncHandler registration and both public ChatStateEvent paths remain available. Parse incoming chat activity with ChatstateStanza::parse; it no longer implements bidirectional ProtocolNode. Send activity through the chatstate API.
Keep ClientBuild::into_parts when the host owns the manual sync worker; drain its receiver and pass each task to Client::process_sync_task. Dependency reexports remain available for naming types in public signatures.
Use CacheStore, Freshness, LidPnEntry and LearningSource for supported host integrations. Concrete cache and SFrame session machinery is restricted to internal or benchmark use. Public key derivation helpers and E2eSrtpKeys remain available. Test-only incoming-call constructors require the test utility feature; normal incoming-call construction and media access remain supported.
Return HTTP status before deciding recovery
Build requests throughHttpRequest::get or post and their setters. Custom HTTP hosts use HttpResponse::new(status_code, body) or StreamingHttpResponse::new(status_code, reader). Public fields remain readable; the DTOs no longer allow external literals. Iterate the default endpoint slice instead of requiring a fixed array length.
Return a received non-success HTTP status in Ok, including 4xx/5xx. Successful buffered responses require complete bodies. Diagnostic non-success bodies may be bounded or partial while retaining status. A transport failure remains an error.
Recovery belongs to the operation. Session-derived downloads have bounded recovery after 401; 403/404/410 are terminal reference rejections. Upload authentication recovery has a different policy. Neither status classification nor reconnection admission authorizes replaying an operation whose outcome is unknown. See HTTP hosts, downloads and uploads.
Inspect parsing causes
The required IQ node helpers exposewacore::iq::node::IqParseError, distinguishing MissingChild { tag } and MissingAttribute { name }. Recover the type through the existing error chain or anyhow::Error::downcast_ref; match with a fallback. The error contains the expected field name, not raw response data.
This type does not classify every parser failure. A malformed IQ response is distinct from a server rejection, HTTP status, timeout, transport loss or storage failure. IqSpec keeps its existing signature.
For newsletter get_my_addons, invalid input remains NewsletterError::InvalidRequest before sending. A malformed response becomes NewsletterError::Iq(IqError::ParseError(_)), preserving the cause. See the newsletter reference. Do not depend on the full text of a parser error.
Separate history capture from message commits
Move implementations ofInboundDurabilityHook::on_history_sync to HistorySyncCaptureHook, then register that hook separately. One object can implement both traits. Registering only the message hook no longer changes history receipt timing. Capture-only hosts do not need pending-inbound message storage.
BotBuilder exposes the same registration. Use with_history_sync_capture_hook for an owned implementation. The callback is required; it has no default no-op implementation.
Capture receives decrypted but still compressed bytes before decompression and protobuf validation. Make it idempotent by message ID within the account and safe for concurrent calls. Persist the bytes before returning success if your application needs them durably.
Capture-only registration does not retain notifications for replay or schedule automatic capture retries. Use the separate durability hook for host-owned recovery. Withholding a receipt does not guarantee phone redelivery or complete history. Shutdown neither joins nor cancels an already-entered callback. Coordinate its lifetime in your host and use
Client::shutdown_signal when it needs to observe shutdown.
Implement atomic storage operations
The merged storage contract requires explicit implementations ofProtocolStore::touch_tc_token_sender_timestamp, ProtocolStore::store_received_tc_token and AppSyncStore::commit_patch. Their argument and result types are unchanged. Migrate forwarding wrappers along with the underlying backend.
Token updates atomically preserve the other writer’s fields in device scope. Sender timestamps advance by maximum. Received tokens accept newer or equal timestamps; an empty placeholder cannot block the first real token. The two issued-token field merges are individually atomic, not a combined transaction.
A patch commit stores its version/hash and all removed/added MACs together, with removals before additions. Error or cancellation must expose the complete old or complete new patch. A transaction, CAS retry or shared backend-wide lock can provide this boundary; a callback batch or later flush alone cannot.
An error can follow a complete commit. SQLite’s CommitBarrierError must remain observable, and the processor publishes mutations only after Ok. Atomicity does not recover delivery after this post-commit failure or guarantee that restart can replay the committed cursor. These requirements apply to the audited main snapshot, the custom-backend requirements.
Preserve optional label action times
Core #1691 is merged in the audited main snapshot. Installation and examples use the audited revision.
action_timestamp: Option<DateTime<Utc>> on LabelEditUpdate, LabelAssociationUpdate, MessageLabelAssociationUpdate and LabelSublistUpdate when you need to preserve whether an action time was carried. An absent or unrepresentable value becomes None; explicit zero becomes Some of the Unix epoch. The three legacy label events retain their timestamp fallbacks: epoch for absence and local dispatch time for an out-of-range value. LabelSublistUpdate has no fallback timestamp field; preserve its optional action time and from_full_sync directly.
This is the carried action time, not a server receipt time or replay/live classification. Keep from_full_sync independent. Existing builders can omit the new optional field. Serialized payloads add action_timestamp as a timestamp or null; these event types implement serialization, not deserialization. See label events.
Check replay and recovery limits
The audited main includes generated protobuf source evolution and retained inbound plaintext. These contracts do not promise lossless protobuf editing or exactly-once delivery. Session batching optimizations do not change the public hook, retry or storage contract. Register group capture independently if you need a durable notification outbox. App-state recovery accepts bounded zlib or gzip whenis_compressed is true, raw protobuf when it is false, and rejects stale connection responses while ordinary snapshot MAC validation remains enabled. Contact lookups learn validated PN/LID pairs without rewriting stored cryptographic creators. Consume label sublist updates separately from label assignments.
A failed pending-buffer write now retains encoded plaintext in the same Client across cancellation and reconnect. Redelivery retries persistence without decrypting the Signal ciphertext again. Process termination still loses a resident-only copy. Adopt the bounded reads and conditional mutations required by custom backends, and retain consumer deduplication. A stored row only helps while retained and reached by the replay path; withholding an ACK does not guarantee redelivery. See inbound durability.
Newsletter/channel messages and PDO placeholder recoveries remain outside the message durability hook. Persist their events through the appropriate application path. No exactly-once or universal Event::Messages delivery guarantee follows from registering the hook.
Validate data and operational profiles separately
Keep source compatibility separate from persistent-data migration. Stop writers and retain a consistent backup before changing the dependency. Exercise opening, migration, decryption, sending and restart on a copy with your target revision. The available historical-writer evidence covers v0.7.0; it does not prove every older baseline, downgrade or restoration of an old Signal-state backup. Cancellation can end your wait after an operation produced local or remote effects. Preserve partial results and retry only the documented remaining step, such as synchronization afterPushNameOutcome::SyncPending.
Before adopting the integrated dependency, compile the complete EN/PT examples and your custom hosts against that exact SHA, then repeat the selected consumers against its packaged artifacts outside the source workspace. Include the actual MSRV, browser and opt-in features you intend to support. Keep data-upgrade tests and profile-specific live qualification as separate evidence. In particular, do not infer VoIP interoperability from compilation, schema tests or skipped call tests.
Update policy, download and host integrations
ReplaceRetryAdmission::admit and client retry-policy setters with builder registration and borrowed-context decide methods. Register decrypt-failure admission independently and account for its ACK and recovery-loss boundary. See retry admission.
Pass DownloadLimits to every client or standalone download call. Use Default for no added media byte cap or explicit wire/plaintext budgets with streaming. Configure app-state retained blob capacity separately through CacheConfig::app_state_downloads. See download limits and app-state memory.
Construct generated MEX variables, nested input and response shapes with Default plus field assignment. They are non-exhaustive, including the retained historical modules. Keep omission distinct from server-requiredness. Generated open StanzaMessageType and EncMediaType enums also require wildcard match arms; their Unknown(String) fallback preserves unmodeled wire values. Closed enums retain their existing policy. See MEX.
Implement explicit pairwise session locking and handle unsupported Signal adapter operations. Preserve retry-exhaustion attempts and sources. Local WASM runtimes may hold local state; cancellation requests do not join tasks or roll back effects. See custom backends, storage errors and runtime cancellation.
Use the generation-scoped CallHandle::phase for signaling snapshots, independently of media diagnostics. Custom encrypted handlers remain detached application work. See calls and extension lifetime.
Update current host integrations
The minimum compiler is Rust 1.95. Browser SQLite host hooks now require explicitjs opt-in. Primary-mobile configuration is a separate optional workflow with aligned runtime/storage clocks, explicit environment trust and persisted role binding. Follow mobile sessions.
Replace positional chat-clear flags with ClearChatOptions; prefer set_text_status for About updates. Use Newsletter::send_poll for plaintext channel polls. Replace removed process-global Signal crypto hooks with the runtime-owned provider. Historical Signal storage remains supported through bounded codecs and record components; this does not preserve removed implementation module paths.
For recoverable history, install HistorySyncDurabilityHook and retain notification records for host-scheduled replay. The capture-only contract above remains separate. Audit your custom backend’s pending-inbound operations even if you use history durability without a live-message hook. Inspect must-use shutdown reports and wait separately for crate-owned store release.