Skip to content

Commit e2cf34d

Browse files
committed
Merge #317: chore: bump MSRV to 1.85.0
eceb1a3 ci: Add .github/zizmor.yml config (valued mammal) c78915a Update README example to use rusqlite (valued mammal) b5db35e Make repo into a single crate (valued mammal) a489e35 Update justfile (valued mammal) 70560b5 Rename `example-crates` directory (valued mammal) f21e26e ci: Remove unmaintained actions-rs/toolchain (valued mammal) 9d0491c chore: bump MSRV to 1.85.0 (valued mammal) dc13690 chore: exclude example crates (valued mammal) Pull request description: Bump `bdk_wallet` MSRV to 1.85.0. Restructure repository to be a single rust project. Small cleanups to `.github/workflows` by moving away from unmaintained `actions-rs/toolchain` in favor of `dtolnay/rust-toolchain`. Follow-ups - [x] Address zizmor code scanning results - [ ] Use rust edition 2024. May have to remove some "unnecessary binding modifiers" - [ ] Consider updating `.github/CODEOWNERS` fix #289 ### Notes to the reviewers ### Changelog notice ```md Changed - Raise project MSRV to 1.85.0 - ci: Migrate to `dtolnay/rust-toolchain` - ci: Add zizmor.yml config ``` ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) ACKs for top commit: thunderbiscuit: ACK eceb1a3. Nice cleanup. Tree-SHA512: 57d155851b96dba12d534c8d9b1a91c147c0fe390f9931f0961b471518b6a7df1dd19c167b3e4d0c1187306af8f5ccb003bcf7dec0ef453e1cf4a9b172c5fb00
2 parents 680e66a + eceb1a3 commit e2cf34d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+218
-471
lines changed

.github/workflows/code_coverage.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ jobs:
2121
- name: Install lcov tools
2222
run: sudo apt-get install lcov -y
2323
- name: Install Rust toolchain
24-
uses: actions-rs/toolchain@v1
24+
uses: dtolnay/rust-toolchain@v1
2525
with:
2626
toolchain: stable
27-
override: true
28-
profile: minimal
2927
components: llvm-tools-preview
3028
- name: Rust Cache
3129
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0

.github/workflows/cont_integration.yml

Lines changed: 17 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ name: CI
44

55
permissions: {}
66

7-
jobs:
7+
env:
8+
CARGO_TERM_COLOR: always
89

10+
jobs:
911
prepare:
1012
runs-on: ubuntu-latest
1113
outputs:
@@ -30,8 +32,7 @@ jobs:
3032
- ubuntu-24.04-arm
3133
rust:
3234
- version: ${{ needs.prepare.outputs.rust_version }}
33-
clippy: true
34-
- version: 1.63.0 # Overall MSRV
35+
- version: 1.85.0 # MSRV
3536
features:
3637
- --no-default-features --features miniscript/no-std,bdk_chain/hashbrown
3738
- --all-features
@@ -41,22 +42,20 @@ jobs:
4142
with:
4243
persist-credentials: false
4344
- name: Install Rust toolchain
44-
uses: actions-rs/toolchain@v1
45+
uses: dtolnay/rust-toolchain@v1
4546
with:
4647
toolchain: ${{ matrix.rust.version }}
47-
override: true
48-
profile: minimal
4948
- name: Rust Cache
5049
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0
5150
- name: Pin dependencies for MSRV
52-
if: matrix.rust.version == '1.63.0'
51+
if: matrix.rust.version == '1.85.0'
5352
run: ./ci/pin-msrv.sh
5453
- name: Build + Test
5554
env:
5655
MATRIX_RUST_VERSION: ${{ matrix.rust.version }}
5756
run: |
58-
cargo build --workspace --exclude 'example_*' ${{ matrix.features }}
59-
cargo test --workspace --exclude 'example_*' ${{ matrix.features }}
57+
cargo build --workspace --all-targets ${{ matrix.features }}
58+
cargo test --workspace ${{ matrix.features }}
6059
6160
check-no-std:
6261
needs: prepare
@@ -68,16 +67,13 @@ jobs:
6867
with:
6968
persist-credentials: false
7069
- name: Install Rust toolchain
71-
uses: actions-rs/toolchain@v1
70+
uses: dtolnay/rust-toolchain@v1
7271
with:
7372
toolchain: ${{ needs.prepare.outputs.rust_version }}
74-
override: true
75-
profile: minimal
7673
# target: "thumbv6m-none-eabi"
7774
- name: Rust Cache
7875
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0
79-
- name: Check bdk wallet
80-
working-directory: ./wallet
76+
- name: Check no-std
8177
# TODO "--target thumbv6m-none-eabi" should work but currently does not
8278
run: cargo check --no-default-features --features miniscript/no-std,bdk_chain/hashbrown
8379

@@ -98,16 +94,13 @@ jobs:
9894
- run: sudo apt-get update || exit 1
9995
- run: sudo apt-get install -y libclang-common-14-dev clang-14 libc6-dev-i386 || exit 1
10096
- name: Install Rust toolchain
101-
uses: actions-rs/toolchain@v1
97+
uses: dtolnay/rust-toolchain@v1
10298
with:
10399
toolchain: ${{ needs.prepare.outputs.rust_version }}
104-
override: true
105-
profile: minimal
106-
target: "wasm32-unknown-unknown"
100+
targets: "wasm32-unknown-unknown"
107101
- name: Rust Cache
108102
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0
109-
- name: Check bdk wallet
110-
working-directory: ./wallet
103+
- name: Check WASM
111104
run: cargo check --target wasm32-unknown-unknown --no-default-features --features miniscript/no-std,bdk_chain/hashbrown
112105

113106
fmt:
@@ -119,11 +112,9 @@ jobs:
119112
with:
120113
persist-credentials: false
121114
- name: Install Rust toolchain
122-
uses: actions-rs/toolchain@v1
115+
uses: dtolnay/rust-toolchain@v1
123116
with:
124117
toolchain: nightly
125-
override: true
126-
profile: minimal
127118
components: rustfmt
128119
- name: Check fmt
129120
run: cargo fmt --all --check
@@ -138,43 +129,12 @@ jobs:
138129
- uses: actions/checkout@v4
139130
with:
140131
persist-credentials: false
141-
- uses: actions-rs/toolchain@v1
132+
- uses: dtolnay/rust-toolchain@v1
142133
with:
143134
toolchain: ${{ needs.prepare.outputs.rust_version }}
144135
components: clippy
145-
override: true
146136
- name: Rust Cache
147137
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0
148-
- uses: actions-rs/clippy-check@v1
149-
with:
150-
token: ${{ secrets.GITHUB_TOKEN }}
151-
name: Clippy Results
152-
args: --all-features --all-targets -- -D warnings
138+
- name: Clippy
139+
run: cargo clippy --all-features --all-targets -- -D warnings
153140

154-
build-examples:
155-
needs: prepare
156-
name: Build & Test Examples
157-
runs-on: ubuntu-latest
158-
strategy:
159-
matrix:
160-
example-dir:
161-
- example_wallet_electrum
162-
- example_wallet_esplora_async
163-
- example_wallet_esplora_blocking
164-
- example_wallet_rpc
165-
steps:
166-
- name: checkout
167-
uses: actions/checkout@v4
168-
with:
169-
persist-credentials: false
170-
- name: Install Rust toolchain
171-
uses: actions-rs/toolchain@v1
172-
with:
173-
toolchain: ${{ needs.prepare.outputs.rust_version }}
174-
override: true
175-
profile: minimal
176-
- name: Rust Cache
177-
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0
178-
- name: Build
179-
working-directory: examples/${{ matrix.example-dir }}
180-
run: cargo build

.github/zizmor.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Zizmor config
2+
rules:
3+
unpinned-uses:
4+
config:
5+
policies:
6+
# Allow pin by ref/tag
7+
dtolnay/rust-toolchain: ref-pin

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ Cargo.lock
88
# Example persisted files.
99
*.db
1010
*.sqlite*
11+
examples/test_data
File renamed without changes.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Every new feature should be covered by functional tests where possible.
4646
When refactoring, structure your PR to make it easy to review and don't
4747
hesitate to split it into multiple small, focused PRs.
4848

49-
The Minimum Supported Rust Version is **1.63.0** (enforced by our CI).
49+
The Minimum Supported Rust Version is **1.85.0** (enforced by our CI).
5050

5151
Commits should cover both the issue fixed and the solution's rationale.
5252
These [guidelines](https://chris.beams.io/posts/git-commit/) should be kept in mind. Commit messages follow the ["Conventional Commits 1.0.0"](https://www.conventionalcommits.org/en/v1.0.0/) to make commit histories easier to read by humans and automated tools. All commits must be [GPG signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).

Cargo.toml

Lines changed: 74 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,76 @@
1-
[workspace]
2-
resolver = "2"
3-
members = [
4-
"wallet",
5-
"examples/example_wallet_electrum",
6-
"examples/example_wallet_esplora_blocking",
7-
"examples/example_wallet_esplora_async",
8-
"examples/example_wallet_rpc",
9-
]
10-
11-
[workspace.package]
1+
[package]
2+
name = "bdk_wallet"
3+
homepage = "https://bitcoindevkit.org"
4+
version = "3.0.0-alpha.0"
5+
repository = "https://github.com/bitcoindevkit/bdk_wallet"
6+
documentation = "https://docs.rs/bdk_wallet"
7+
description = "A modern, lightweight, descriptor-based wallet library"
8+
keywords = ["bitcoin", "wallet", "descriptor", "psbt"]
9+
readme = "README.md"
10+
license = "MIT OR Apache-2.0"
1211
authors = ["Bitcoin Dev Kit Developers"]
12+
edition = "2021"
13+
rust-version = "1.85.0"
1314

14-
[workspace.lints.clippy]
15-
print_stdout = "deny"
16-
print_stderr = "deny"
15+
[package.metadata.docs.rs]
16+
all-features = true
17+
rustdoc-args = ["--cfg", "docsrs"]
18+
19+
[dependencies]
20+
bdk_chain = { version = "0.23.1", features = ["miniscript", "serde"], default-features = false }
21+
bitcoin = { version = "0.32.6", features = ["serde", "base64"], default-features = false }
22+
miniscript = { version = "12.3.1", features = ["serde"], default-features = false }
23+
rand_core = { version = "0.6.0" }
24+
serde_json = { version = "1" }
25+
serde = { version = "1", features = ["derive"] }
26+
27+
# Optional dependencies
28+
anyhow = { version = "1.0.98", optional = true }
29+
bdk_file_store = { version = "0.21.1", optional = true }
30+
bip39 = { version = "2.0", optional = true }
31+
tempfile = { version = "3.20.0", optional = true }
32+
33+
[features]
34+
default = ["std"]
35+
std = ["bitcoin/std", "bitcoin/rand-std", "miniscript/std", "bdk_chain/std"]
36+
compiler = ["miniscript/compiler"]
37+
all-keys = ["keys-bip39"]
38+
keys-bip39 = ["bip39"]
39+
rusqlite = ["bdk_chain/rusqlite"]
40+
file_store = ["bdk_file_store"]
41+
test-utils = ["std", "anyhow", "tempfile"]
42+
43+
[dev-dependencies]
44+
anyhow = "1"
45+
assert_matches = "1.5.0"
46+
bdk_bitcoind_rpc = { version = "0.21.0" }
47+
bdk_electrum = { version = "0.23.1" }
48+
bdk_esplora = { version = "0.22.1", features = ["async-https", "blocking-https", "tokio"] }
49+
bdk_wallet = { path = ".", features = ["rusqlite", "file_store", "test-utils"] }
50+
clap = { version = "4.5.17", features = ["derive", "env"] }
51+
ctrlc = "3.4.6"
52+
rand = "0.8"
53+
tempfile = "3"
54+
tokio = { version = "1.38.1", features = ["rt", "rt-multi-thread", "macros"] }
55+
56+
[[example]]
57+
name = "mnemonic_to_descriptors"
58+
path = "examples/mnemonic_to_descriptors.rs"
59+
required-features = ["all-keys"]
60+
61+
[[example]]
62+
name = "miniscriptc"
63+
path = "examples/compiler.rs"
64+
required-features = ["compiler"]
65+
66+
[[example]]
67+
name = "electrum"
68+
69+
[[example]]
70+
name = "esplora_async"
71+
72+
[[example]]
73+
name = "esplora_blocking"
74+
75+
[[example]]
76+
name = "bitcoind_rpc"

0 commit comments

Comments
 (0)