hyperledger-identus / hyperledger-identus/sdk-rust
Bindings: adopt UniFFI 0.32 in isolated native binding crates
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- Avg merge
- 39m
- Merged PRs (30d)
- 153
Description
Parent: #151; roadmap: IDR-044. Research decision: #215. ADR: `docs/adr/0097-use-proc-macro-uniffi-for-the-first-native-did-slice.md`.
## Consumer outcome
Swift and Kotlin consumers receive generated native bindings for stable generic SDK capabilities without exposing raw secrets, Rust dependency types or unstable domain internals across the ABI. React Native and browser React remain separately qualified adapters rather than implied extensions of native success.
## Research decision
Conditionally adopt `uniffi = 0.32.0` from the released `mozilla/uniffi-rs@5c7b73906358e1a7acdc1bdc7bf5cd86fb27e44c` tag (MPL-2.0) in binding crates only.
Issue #215 proved the first slice: bounded `identus-did` DID/DID URL parsing using proc macros and compiled-library generation. An isolated Rust 1.98.1 fixture passed Rust tests, exact double-generation/API drift, Swift 6.3 runtime and Kotlin 2.2.20/JNA 5.18.1 runtime. Generic domain crates remain UniFFI-free.
The proof is research, not supported FFI. Its isolated lock resolved 85 packages; the default normal/build fixture graph had 54 unique package/version renderings including the SDK graph, and 79 with bindgen CLI tooling. Production must keep generator tooling out of runtime artifacts, use the pinned advisory/license gates, and define panic/ownership/memory/threading/versioning contracts.
## Delivery split
- #222 — production native DID/DID URL slice for Swift/Kotlin, including iOS/Android runtime and packaging.
- #223 — React Native/TurboModule research after an exact UniFFI 0.32-compatible release; assessed 0.31.0-5 is not adopted.
- #224 — separate browser React `wasm-bindgen` adapter research.
## Before implementation
Each child creates the appropriate storage/FFI-class OpenSpec and full `research.md`, inventories downstream call shapes read-only, threat-models its ABI/runtime/ownership/errors, and passes factory research/constraint readiness.
## Shared boundaries
- Isolated binding/adapter crates with minimal exact features.
- Explicit value versus opaque-handle mapping, lifetime/threading/cancellation rules and stable redacted codes.
- Reproducible generation, versioning and artifact provenance.
- No raw seed/private-key bytes, concrete custody, UI, server framework, downstream mutation, publication or release.
- Native success does not activate React Native, browser, Node or certification claims.
## Epic completion
This epic completes only when accepted child issues activate their exact supported surfaces and the machine-readable support/constraint policy is updated with runtime/package evidence.
Contributor guide
Research direction
Read ADR `docs/adr/0097-use-proc-macro-uniffi-for-the-first-native-did-slice.md`, research decision #215, and the delivery issues #222–#224 before choosing a supported surface. Done requires an accepted child issue to activate its exact surface and the machine-readable support/constraint policy to include runtime and package evidence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, rust, swift
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100