uniffi-packaging-versioning

Package UniFFI Rust crates into Android and Apple artifacts with versioned generated bindings.

2|1|Updated Aug 19, 2026
One-click install
npx skills add https://github.com/po4yka/rust-skills --skill uniffi-packaging-versioning-po4yka
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: uniffi-packaging-versioning
Source: https://github.com/po4yka/rust-skills/tree/main/skills/uniffi-packaging-versioning
Command: npx skills add https://github.com/po4yka/rust-skills --skill uniffi-packaging-versioning-po4yka

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Shipping a Rust UniFFI crate to Android and iOS fails when generated Kotlin/Swift bindings and the compiled native library drift apart, producing load-time checksum mismatches, RustBuffer deserialization errors, or missing native libraries on devices. This Skill provides the commands, triage tables, and release-proof procedures to keep bindings and library at the same revision. ## Core Features & Use Cases - Binding regeneration gate: Build an in-crate uniffi-bindgen binary pinned to the runtime version, wrap generation in a checked-in script with --check and --write modes, and block merges on drift in CI. - FFI change classification: Classify exported API changes as additive or breaking using a table that accounts for checksum-blind record field and enum variant changes, and coordinate breaking changes across consumers. - Platform packaging and release proof: Produce per-ABI Android .so files under jniLibs, stage the generated header and module.modulemap into XCFramework slices, and prove a release candidate on the final APK, AAB, AAR, or XCFramework. - Use Case: After bumping uniffi from 0.31 to 0.32.1, regenerate bindings with the in-crate generator, review the generated diff, rebuild both native artifacts, and run a generated-binding call on each shipping ABI family and an iOS simulator before release. ## Quick Start Ask the agent to set up the UniFFI binding regeneration script with a CI check gate for your FFI crate and classify your pending exported API change as additive or breaking.

Frequently Asked Questions about uniffi-packaging-versioning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a UniFFI API checksum mismatch error?▼

A checksum mismatch means the generated bindings and the native library come from different revisions or uniffi versions. Regenerate bindings with the in-crate generator from the library built at the current revision, then rebuild the artifact so both ship together.

How do I keep generated UniFFI bindings in sync with Rust code?▼

Check in the generated Kotlin, Swift, C header, and modulemap, and run a regeneration script in --check mode in the Rust CI lane so any diff blocks the merge. Commit regenerated files in the same commit as the Rust change.

Why does Kotlin throw junk remaining in buffer after lifting with UniFFI?▼

This error, or a BufferUnderflowException, means a record field or enum variant changed without regenerating bindings and rebuilding the library together. Record fields are checksum-blind, so regenerate and rebuild in the same change and add the --check gate.

Which UniFFI version should I use for Android Kotlin consumers?▼

Use UniFFI 0.32.1 or later. Versions 0.30.0 through 0.32.0 have device-specific Kotlin checksum defects on ARM32 and arm64-v8a, and no 0.30.x or 0.31.x release is safe on both.

Why does generated Swift show hundreds of cannot find type RustBuffer errors?▼

The FFI Clang module failed to build, and the #if canImport guard hides the real cause. Build the FFI module alone and read its first error, then check the staged header, module.modulemap file name, and module name.

When is a UniFFI FFI change considered breaking?▼

Removing or renaming exports, changing argument or return types, adding record fields without defaults, and adding enum variants are breaking changes requiring a major bump. When in doubt, classify as breaking and ship bindings and library together.