This repository was archived by the owner on Aug 7, 2026. It is now read-only.
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
# app_rt
`app_rt` provides the mobile lifecycle and presentation boundary over the
host-neutral `radroots_sdk` client. It does not own a second storage, signing,
transport, synchronization, or product-operation engine.
The native FFI composition retains SDK-owned signer and Nostr slots around the
same client. iOS owns secure-key persistence, selected-identity metadata,
lifecycle polling, and retry scheduling. Relay replacement is validated and
inert; fetch and publish calls perform one bounded SDK operation. The runtime
does not expose a Rust-owned post stream or background worker.
## Mobile FFI contract
`RadrootsRuntime` is a thread-safe UniFFI object. Construction is synchronous
and inert apart from deterministic in-memory SDK composition. SDK operations
that can touch resources are exposed as async Swift/Kotlin methods. Mobile
hosts must retain the runtime for the complete call and must invoke
`shutdown()` before releasing their final reference.
Shutdown is explicit, async, and idempotent. Cancelling the future before its
first poll has no effect. Cancelling after close begins leaves the client
unavailable; the host must invoke `shutdown()` again to complete or confirm
the close. Dropping the object never blocks and never installs an executor.
SDK failures cross the FFI boundary only as versioned `SdkErrorRecord` values.
The record includes the stable protocol code, class, retryability, recovery
actions, optional operation/capability identities, and a secret-safe message.
Native source chains and unstable SDK implementation types are not exported.
Bindings are generated from the `radroots_app_ffi` native library metadata
with `cargo run -p radroots_app_bindgen -- generate --library <native-lib>`.
The governed module names live in `crates/ffi/uniffi.toml`; generated
Swift/Kotlin sources and packaged native artifacts belong to their consuming
host repositories and must not be checked in here as source locks. The
generator is a private workspace tool so its CLI dependency graph is not linked
into the production FFI library.
Release builders provide `RADROOTS_SOURCE_SHA` and `SOURCE_DATE_EPOCH`. Both
values are validated and embedded when present. Ordinary builds omit them;
the build script never reads Git state or the wall clock, so extracted packages
and registry consumers receive the same source-derived metadata contract.
## Copyright
Except as otherwise noted, all files in the `app_rt` distribution are
Copyright (c) 2025 Tyson Lupul
## License
This repository is licensed under GPL-3.0-or-later. See LICENSE.