Add Kotlin JVM bindings#1797
Conversation
970ceea to
3b3123d
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1797 +/- ##
==========================================
+ Coverage 62.51% 62.56% +0.04%
==========================================
Files 329 329
Lines 53644 53644
==========================================
+ Hits 33535 33560 +25
+ Misses 20109 20084 -25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0f8af0c to
f9e9944
Compare
thesimplekid
left a comment
There was a problem hiding this comment.
There are things done here that I left on comments on the Dart/Swift PR that I would like to address there before moving on. Multiple rust-toolchains, use of nix develop and not nix build.
Add Kotlin/JVM bindings for CDK using UniFFI, following the same pattern as the existing Dart and Swift bindings. Includes a Gradle project with JNA-based native library loading, a generate-bindings.sh build script, and JUnit 5 integration tests (initial balance, mint flow) mirroring the Dart test suite.
Add missing rust-toolchain.toml to Kotlin bindings and update Dart and Swift toolchain pins from 1.90.0 to 1.94.0 to match the workspace.
Move Dart and Kotlin binding generation from shell scripts run inside nix develop to proper Crane derivations (dartBindings, kotlinBindings) that benefit from Cachix caching. The expensive Rust cdylib compilation and uniffi-bindgen codegen are now cached as nix store artifacts, making CI rebuilds near-instant on cache hit. Update CI workflow to use `nix build .#dart-bindings` and `nix build .#kotlin-bindings` instead of `nix develop --command just binding-*`. Outputs are copied to the expected directory layout so existing test commands continue to work unchanged.
0a508fa to
7559467
Compare
The three per-binding rust-toolchain.toml files were identical copies of the root one with cross-compilation targets added. Merge the targets into the root file and replace the duplicates with symlinks, since native_toolchain_rust (Dart) expects the file in the crate directory.
7559467 to
6357afb
Compare
There was a problem hiding this comment.
Why is this different then the one we're already using for our bindings.
There was a problem hiding this comment.
Should we gitignore this?
There was a problem hiding this comment.
Looks like its also committed in cdk-kotlin so maybe we need it.
Description
Add Kotlin/JVM bindings for CDK using UniFFI, following the same pattern as the existing Dart and Swift bindings. Includes a Gradle project with JNA-based native library loading, a generate-bindings.sh build script, and JUnit 5 integration tests (initial balance, mint flow) mirroring the Dart test suite.
Notes to the reviewers
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just final-checkbefore committing