From a810a218f726ae2658f058c0a77bdb22a246e00f Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 9 Sep 2026 09:30:17 -0500 Subject: [PATCH 1/2] fix(build): enforce locked native dependency resolution --- hook/build.dart | 2 +- scripts/generate_bindings.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hook/build.dart b/hook/build.dart index 1d97b29..41bee1a 100644 --- a/hook/build.dart +++ b/hook/build.dart @@ -11,7 +11,7 @@ Future main(List args) async { // config explicitly instead of relying on Cargo's working-directory lookup. await RustBuilder( assetName: 'uniffi:bdk_dart_ffi', - extraCargoBuildArgs: ['--config', cargoConfigPath], + extraCargoBuildArgs: ['--locked', '--config', cargoConfigPath], ).run(input: input, output: output); }); } diff --git a/scripts/generate_bindings.sh b/scripts/generate_bindings.sh index 9bc4d39..c0028ef 100644 --- a/scripts/generate_bindings.sh +++ b/scripts/generate_bindings.sh @@ -30,9 +30,9 @@ fi # Navigate to the native directory to build the rust code using Cargo.toml cd "$NATIVE_DIR" echo "Building bdk-dart-ffi..." -cargo build --profile dev +cargo build --locked --profile dev # Generate Dart bindings using local uniffi-bindgen wrapper -cargo run --profile dev --bin uniffi-bindgen -- generate --library --language dart --out-dir "$BDK_DART_DIR/lib/" "$NATIVE_DIR/target/debug/$LIBNAME" +cargo run --locked --profile dev --bin uniffi-bindgen -- generate --library --language dart --out-dir "$BDK_DART_DIR/lib/" "$NATIVE_DIR/target/debug/$LIBNAME" -echo "Bindings generated successfully!" \ No newline at end of file +echo "Bindings generated successfully!" From 57f0416242204a2f5ec811d2ffc2a1e6e8f483f7 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 9 Sep 2026 09:32:40 -0500 Subject: [PATCH 2/2] ci: check generated dart bindings for drift --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4fd1ff5..9585645 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,9 @@ jobs: - name: Ensure generated bindings exist run: test -f lib/bdk.dart + - name: Check generated binding drift + run: git diff --exit-code -- lib/bdk.dart + - name: Pub get run: dart pub get