From bdf3c2ad64f62e4fefdf262cc219be957ef30424 Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 12 Jan 2026 11:00:40 -0600 Subject: [PATCH 1/5] docs(example): update run instructions for native assets --- example/main.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/main.dart b/example/main.dart index ed28d92..30d3b88 100644 --- a/example/main.dart +++ b/example/main.dart @@ -2,11 +2,11 @@ import 'dart:io'; import 'package:bdk_dart/bdk.dart'; -/// Run with: `dart run examples/network_example.dart` +/// Run with: `dart run example/main.dart` /// /// Prerequisites: -/// * Generated bindings (`scripts/generate_bindings.sh`) -/// * Native library (`libbdkffi.*`) discoverable by the Dart process +/// * Rust toolchain available for Native Assets builds. +/// * If you update native bindings, run `bash ./scripts/generate_bindings.sh`. void main() { final network = Network.testnet; From cc125dcef032fec715b5532031f079d4682057b9 Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 12 Jan 2026 11:09:28 -0600 Subject: [PATCH 2/5] chore(deps): pin bdk-ffi and uniffi-dart git revs --- native/Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/native/Cargo.toml b/native/Cargo.toml index 77b3405..de01dc8 100644 --- a/native/Cargo.toml +++ b/native/Cargo.toml @@ -17,13 +17,13 @@ name = "uniffi-bindgen" path = "uniffi-bindgen.rs" [dependencies] -bdk-ffi = { package = "bdk-ffi", git = "https://github.com/bitcoindevkit/bdk-ffi.git", branch = "master" } +bdk-ffi = { package = "bdk-ffi", git = "https://github.com/bitcoindevkit/bdk-ffi.git", rev = "6ed0930e3d8ced2ddfd49c6a7bc8a7dec203bb2c" } uniffi = { version = "=0.30.0", features = ["cli"] } -uniffi-dart = { git = "https://github.com/Uniffi-Dart/uniffi-dart" } +uniffi-dart = { git = "https://github.com/Uniffi-Dart/uniffi-dart", rev = "5bdcc790c3fc99845e7b4a61d7a4f6e1460896e9" } camino = "1.2" [build-dependencies] uniffi = { version = "=0.30.0", features = ["build"] } -uniffi-dart = { git = "https://github.com/Uniffi-Dart/uniffi-dart", features = [ +uniffi-dart = { git = "https://github.com/Uniffi-Dart/uniffi-dart", rev = "5bdcc790c3fc99845e7b4a61d7a4f6e1460896e9", features = [ "build", ] } From 87db2f3a9f261fff859776c3d8e918e76587b6cf Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 12 Jan 2026 11:12:35 -0600 Subject: [PATCH 3/5] docs(readme): note native assets build time and license source --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f0793af..c063cd4 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,7 @@ dart run example/main.dart If you have the Rust toolchain installed, the native library will be automatically built by Dart's Native Assets system. As a user of the package, you don't need to worry about building the native library or bindings yourself. Only if you want to contribute to the bindings or modify the native code yourself, you can follow the instructions in [development](#development) below. +The first build can take several minutes depending on your machine and network (subsequent builds are faster). ## Development @@ -83,5 +84,5 @@ dart test ## License The Rust crate and generated bindings are dual-licensed under MIT or Apache 2.0 per the -`license = "MIT OR Apache-2.0"` entry in `Cargo.toml`. You may choose either license when +`license = "MIT OR Apache-2.0"` entry in `native/Cargo.toml`. You may choose either license when using the library in your project. From 28743902883293874628ff098548f22dff667439 Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 12 Jan 2026 11:19:29 -0600 Subject: [PATCH 4/5] chore(just): align commands with native assets and ci --- justfile | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index 47badbf..8c2ec6a 100644 --- a/justfile +++ b/justfile @@ -11,12 +11,12 @@ repo: [group("Dart")] [doc("Format the Dart codebase.")] format: - dart format . + dart format lib test example bdk_demo/lib bdk_demo/test [group("Dart")] [doc("Run static analysis.")] analyze: - dart analyze + dart analyze --fatal-infos --fatal-warnings lib test example [group("Dart")] [doc("Generate the API documentation.")] @@ -28,6 +28,24 @@ docs: test *ARGS: dart test {{ if ARGS == "" { "" } else { ARGS } }} +[group("Bindings")] +[doc("Build native library and regenerate bindings.")] +generate-bindings: + bash ./scripts/generate_bindings.sh + +[group("Demo")] +[doc("Run Flutter analysis for the demo app.")] +demo-analyze: + cd bdk_demo && flutter analyze + +[group("CI")] +[doc("Run the same checks as CI.")] +ci: + just format + just analyze + just test + just demo-analyze + [group("Dart")] [doc("Remove build and tool artifacts to start fresh.")] clean: @@ -38,4 +56,4 @@ clean: rm -rf bdk_demo/.dart_tool/ rm -rf bdk_demo/build/ rm -rf example/.dart_tool/ - rm -rf example/build/ \ No newline at end of file + rm -rf example/build/ From 4a835bd6935ff19c11b30043ecab7f59437dbd6a Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 12 Jan 2026 11:25:22 -0600 Subject: [PATCH 5/5] docs(readme): clarify pinned deps until upstream releases --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c063cd4..5c28811 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ If you have the Rust toolchain installed, the native library will be automatical As a user of the package, you don't need to worry about building the native library or bindings yourself. Only if you want to contribute to the bindings or modify the native code yourself, you can follow the instructions in [development](#development) below. The first build can take several minutes depending on your machine and network (subsequent builds are faster). +We currently pin git dependencies to specific commits for reproducibility (including `bdk-ffi` until the next release is cut); the plan is to move to release tags as upstream ships them. ## Development