Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 99a830f

Browse files
Merge #73: Add msrv1411 feature to pin once_cell to version =1.14
056422d Add msrv1411 feature to pin once_cell to version =1.14 (Steve Myers) Pull request description: This is a bit of a hack, but if we make the pinned version of once_cell an optional feature, then only downstream projects that need the older version can opt-in to it by enabling the "msrv1411" feature. For example if I do this: ```toml [dependencies] hwi = { path = "../rust-hwi", features = ["msrv1411"] } ``` Then `cargo update` will set the Cargo.lock version of `once_cell` to 1.14.0. But if I don't include the feature: ```toml [dependencies] hwi = { path = "../rust-hwi" } ``` Then when I do `cargo update` the Cargo.lock version of `once_cell` is changed to 1.17.1. I'm not in love with the feature name `msrv1411` if you like this approach and have any better ideas. ACKs for top commit: danielabrozzoni: ACK 056422d Tree-SHA512: 7f5cbb494cde1b498866ba3937eee9e9b4e54a2b1ef9b823db39c5349e4dbbab0cb885d006fc4cce4889d5a38c58c7e4d936a8ca317a66ce3e1bbe00eed7d7de
2 parents 0619f64 + 056422d commit 99a830f

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ jobs:
4141
matrix:
4242
rust:
4343
- version: 1.66.1 # STABLE
44+
features: use-miniscript
4445
- version: 1.41.1 # MSRV
46+
features: use-miniscript,msrv1411
4547
emulator:
4648
- name: trezor
4749
- name: ledger
@@ -83,7 +85,7 @@ jobs:
8385
- name: Update toolchain
8486
run: rustup update
8587
- name: Test
86-
run: cargo test --features use-miniscript
88+
run: cargo test --features ${{ matrix.rust.features }}
8789
- name: Wipe
8890
run: cargo test test_wipe_device -- --ignored
8991
test-readme-examples:

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ serde = { version = "^1.0", features = ["derive"] }
1717
serde_json = { version = "^1.0" }
1818
pyo3 = { version = "0.15.1", features = ["auto-initialize"] }
1919
base64 = "0.13.0"
20-
once_cell = "=1.14"
20+
once_cell = { version = "=1.14", optional = true }
2121

2222
[dev-dependencies]
2323
serial_test = "0.6.0"
2424

2525
[features]
2626
doctest = []
2727
use-miniscript = ["miniscript"]
28+
msrv1411 = ["once_cell"]

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ Rust wrapper for the [Bitcoin Hardware Wallet Interface](https://github.com/bitc
88

99
This library internally uses PyO3 to call HWI's functions. It is not a re-implementation of HWI in native Rust.
1010

11+
## MSRV
12+
13+
The MSRV for this project is `1.41.1` but to support this version you must enable the `msrv1411` feature:
14+
```cargo
15+
[dependencies]
16+
hwi = { path = "../rust-hwi", features = ["msrv1411"] }
17+
```
18+
If the `msrv1411` feature is not enabled you must use at least rust version `1.56.0`.
19+
1120
## Prerequisites
1221

1322
Python 3 is required. The libraries and [udev rules](https://github.com/bitcoin-core/HWI/blob/master/hwilib/udev/README.md) for each device must also be installed. Some libraries will need to be installed

0 commit comments

Comments
 (0)