Skip to content

Commit ac52e95

Browse files
committed
Leave rust-bitcoin compilation flags untouched
Because `wasm_bindgen` enables a hobbled `std` mode by default (where you can "use" the full std, but random bits of it panic), `wasm_bindgen` users really should use `no_std` builds where possible. However, cargo makes this very difficult - crates with `no_std` flags can be silently made `std` just by one dependency setting the flag silently. This happens here by leaving default-features enabled. Luckily, we can simply disable `default-features` and everything else remains.
1 parent 7a453a2 commit ac52e95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ path = "src/lib.rs"
1717

1818
[dependencies]
1919
serde = { version = "1.0", features = ["derive"] }
20-
bitcoin = { version = "0.29.1", features = ["serde"] }
20+
bitcoin = { version = "0.29.1", features = ["serde"], default-features = false }
2121
log = "^0.4"
2222
ureq = { version = "2.5.0", features = ["json"], optional = true }
2323
reqwest = { version = "0.11", optional = true, default-features = false, features = ["json"] }

0 commit comments

Comments
 (0)