Skip to main content

Crate iris_chat_core

Crate iris_chat_core 

Source

Re-exports§

pub use update_policy::UpdateAutoCheckPolicy;

Modules§

desktop_nearby
image_proxy
local_relay
perflog
Minimal millisecond-resolution perf logger that writes straight to Android logcat (or stderr off-Android with IRIS_PERF_LOG=1) without pulling in log + android_logger crates. Used to diagnose where time goes between an FFI dispatch, the core thread processing, and the UI reconcile.
update_policy

Macros§

perflog
IrisPerf tag — adb logcat IrisPerf:I *:S shows only these.

Structs§

AccountSnapshot
AppState
AttachmentDownloadResult
BusyState
ChatMessageSnapshot
ChatThreadSnapshot
CorePerfCountersSnapshot
Core-internal hot-loop counters. FFI surface counters can only catch shells that re-enter the core in a loop — the build_runtime_debug_snapshot regression that caused the macOS CPU loop was entirely internal (relay events fanned out through persist_best_effort_innerpersist_debug_snapshot_best_effort → full SessionManager clone × N known users). The release-gate budget tests assert on this snapshot too so the next time core work explodes per event, CI catches it before a device does.
CurrentChatSnapshot
DesktopNearbyPeerSnapshot
DesktopNearbySnapshot
DeviceApprovalQrPayload
DeviceEntrySnapshot
DeviceRosterSnapshot
FfiApp
FfiDesktopNearby
FfiPerfCountersSnapshot
GroupDetailsSnapshot
GroupMemberSnapshot
LinkDeviceSnapshot
MessageAttachmentSnapshot
MessageDeliveryTraceSnapshot
MessageReactionSnapshot
MessageReactor
MessageRecipientDeliverySnapshot
MessageSearchHit
One row inside the “Messages” section of a search result. Shells render this as a single conversation list row whose subtitle is the matched body and whose title is the chat’s display name (resolved here so the UI doesn’t have to look up the parent thread).
MobilePushNotificationResolution
MobilePushSessionSnapshot
MobilePushSubscriptionRequest
MobilePushSyncSnapshot
MutualGroupsSnapshot
NetworkStatusSnapshot
OutgoingAttachment
PeerProfileDebugSnapshot
PreferencesSnapshot
PublicInviteSnapshot
QrCodeMatrix
RelayConnectionSnapshot
Router
SearchResultSnapshot
TypingIndicatorSnapshot
UniFfiTraitVtableAppReconciler
UniFfiTraitVtableDesktopNearbyObserver
UploadProgress

Enums§

AppAction
AppUpdate
ChatInputShortcut
Classification of the free-text input typed into a chat-action field — the search bar, the “New chat” paste field, the share-link handler. Centralising the parsing here means the UI just looks at the enum and dispatches; no platform has its own ad-hoc contains("://") && contains("#") check.
ChatKind
ChatMessageKind
DeliveryState
DeviceAuthorizationState
Screen

Traits§

AppReconciler
DesktopNearbyObserver

Functions§

app_version
Marketing version baked in at build time from IRIS_APP_VERSION_NAME (or IRIS_APP_VERSION), falling back to the crate semver. Use this instead of env!("CARGO_PKG_VERSION") so UI/release artifacts agree on a single version string.
build_large_test_app_state
Deterministic high-volume shell fixture for list, navigation, and message rendering tests. This is intentionally synthetic: relay-backed tests cover protocol behaviour, while this keeps UI/perf tests fast and reproducible.
build_large_test_search_result
Deterministic grouped search fixture for shell tests that need to verify collapsed initial rendering plus “View more” expansion without writing a large on-disk message index first.
build_mobile_push_create_subscription_request
build_mobile_push_delete_subscription_request
build_mobile_push_list_subscriptions_request
build_mobile_push_update_subscription_request
build_summary
classify_chat_input
Single source of truth for “is this typed text an npub or an invite URL?”. Used by the New Chat paste field, the chat-list search bar, and the deep-link handler so all three branches agree on what counts as a chat-opening shortcut. Returns None for regular search-style text.
decode_device_approval_qr
decrypt_mobile_push_notification_payload
Decrypt a notification payload against the persisted double-ratchet state under data_dir. Use from the FCM service (Android) or Notification Service Extension (iOS) where there’s no live FfiApp. Falls back to the generic resolver when keys, payload, or storage are unavailable so the user still gets some notification.
encode_device_approval_qr
encode_text_qr
Render text to a QR-code module matrix. Returns a square matrix encoded as 1/0 characters in row-major order. Returns None for inputs that don’t fit at the medium error-correction level.
is_trusted_test_build
is_valid_peer_input
mobile_push_subscription_id_key
normalize_peer_input
peer_input_to_hex
Convert any pubkey-shaped input (hex, npub, nprofile, …) to its canonical lowercase-hex form. The empty string is returned when the input can’t be parsed as a public key — callers expecting hex downstream can short-circuit on that.
peer_input_to_npub
Convert any pubkey-shaped input (hex, npub, nprofile, …) to its npub form. Returns the original string when it can’t be parsed as a public key.
proxied_image_url
relay_set_id
resolve_mobile_push_notification_payload
resolve_mobile_push_subscription_server_url
uniffi_iris_chat_core_fn_init_callback_vtable_appreconciler
uniffi_iris_chat_core_fn_init_callback_vtable_desktopnearbyobserver