Skip to content

Commit f819645

Browse files
committed
Merge remote-tracking branch 'benma/feature-deps'
2 parents 5838923 + 03485d3 commit f819645

File tree

3 files changed

+14
-28
lines changed

3 files changed

+14
-28
lines changed

src/rust/bitbox02-rust-c/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ target-factory-setup = [
5151
]
5252
# add Rust features which are called in the C unit tests (currently there is only one target for C tests).
5353
target-c-unit-tests = [
54-
# enable this dependency
55-
"bitcoin", # for rust_base58_encode_check()
56-
# enable these features
54+
"dep:bitcoin", # for rust_base58_encode_check()
5755
"app-bitcoin",
5856
"app-ethereum",
5957
"app-cardano",

src/rust/bitbox02-rust-c/src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub unsafe extern "C" fn rust_util_bytes_mut(buf: *mut c_uchar, len: usize) -> B
119119
///
120120
/// #Safety
121121
/// buf and out must not be NULL and point to valid memory areas.
122-
#[cfg(feature = "bitcoin")]
122+
#[cfg(feature = "c-unit-testing")]
123123
#[no_mangle]
124124
pub unsafe extern "C" fn rust_base58_encode_check(buf: Bytes, mut out: BytesMut) -> bool {
125125
if buf.len == 0 {

src/rust/bitbox02-rust/Cargo.toml

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -63,52 +63,40 @@ features = ["derive"]
6363

6464
[features]
6565
ed25519 = [
66-
# enable these dependencies
67-
"bip32-ed25519",
68-
"ed25519-dalek"
66+
"dep:bip32-ed25519",
67+
"dep:ed25519-dalek"
6968
]
7069

7170
app-ethereum = [
72-
# enable these dependencies
73-
"erc20_params",
74-
"sha3",
75-
"num-bigint",
76-
# enable this feature in the deps
71+
"dep:erc20_params",
72+
"dep:sha3",
73+
"dep:num-bigint",
7774
"bitbox02/app-ethereum",
7875
]
7976

8077
app-bitcoin = [
81-
# enable these dependencies
82-
"bech32",
83-
"miniscript",
84-
# enable this feature in the deps
78+
"dep:bech32",
79+
"dep:miniscript",
8580
"bitbox02/app-bitcoin",
8681
]
8782
app-litecoin = [
88-
# enable these dependencies
89-
"bech32",
90-
# enable this feature in the deps
83+
"dep:bech32",
9184
"bitbox02/app-litecoin",
9285
]
9386

9487
app-u2f = [
95-
# enable this feature in the deps
9688
"bitbox02/app-u2f",
9789
]
9890

9991
app-cardano = [
100-
# enable these deps
101-
"bech32",
102-
"blake2",
103-
"minicbor",
104-
"crc",
105-
106-
# enable these features
92+
"dep:bech32",
93+
"dep:blake2",
94+
"dep:minicbor",
95+
"dep:crc",
10796
"ed25519"
10897
]
10998

11099
testing = [
111-
# enable these features
112100
"bitbox02/testing"
113101
]
114102

0 commit comments

Comments
 (0)