uniffi-boundarylisted
Install: claude install-skill po4yka/rust-skills
# UniFFI Boundary
## Purpose
Use this skill to design, author, and review a UniFFI boundary crate. A UniFFI boundary
crate is a thin adapter: it declares the exported surface, and one bindings generator
produces the Kotlin and the Swift side from the same Rust signatures.
This skill owns the *shape* of that surface:
- proc-macro scaffolding and the single-source-of-truth rule,
- the Record versus Object decision,
- `Send + Sync` on every exported interface,
- `Arc`-based object references and ownership,
- foreign callback traits,
- custom-type converters and JSON-string contracts,
- what is allowed to cross the boundary and what must stay in deeper crates.
This skill does **not** own the error, progress, and cancellation *semantics* — the error
variant taxonomy, forward-compatible catch-all variants, progress mapping to Kotlin `Flow`
or Swift `AsyncThrowingStream`, and cooperative cancel. Those are `ffi-error-progress-cancel`.
It does not own packaging of the generated artifacts — cdylib, staticlib, XCFramework, and
version skew. That is `uniffi-packaging-versioning` and `rust-android-build`. The atomics
under a cancel flag are `memory-model`. Unsafe blocks and FFI safety invariants are
`rust-unsafe`. Unwind policy is `rust-panic-safety`. General API-shape discipline is
`rust-discipline`.
## When to use
- You add, remove, or change any `#[uniffi::export]` function, method, or trait.
- You must decide whether a type is a UniFFI **Record** (by value, fields cross) or an