Skip to content

Commit 2a2e58e

Browse files
authored
chore: disable some unused default features (#117)
# Rationale for this change To build this crate for `wasm32-unknown-unknown` to run on runtimes with a limited custom API available (e.g., Linera contracts), `wasm-bindgen` should not be a dependency. That's because `wasm-bindgen` generates bindings for the Javascript APIs available in browsers (and similar runtimes). For more bare-bones runtimes, these APIs aren't available. # What changes are included in this PR? Disabling the `default` features of `chrono`, `rand` and `rand-core`. Unfortunately, this doesn't complete the work to support `wasm32-unknown-unknown` without JS, because a fix is also needed in `merlin` (zkcrypto/merlin#8). # Are these changes tested? Tested with `cargo test`.
1 parent d165971 commit 2a2e58e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ bytemuck = {version = "1.16.3", features = ["derive"]}
2929
byte-slice-cast = { version = "1.2.1" }
3030
clap = { version = "4.5.4" }
3131
criterion = { version = "0.5.1" }
32-
chrono = { version = "0.4.38" }
32+
chrono = { version = "0.4.38", default-features = false }
3333
curve25519-dalek = { version = "4", features = ["rand_core"] }
3434
derive_more = { version = "0.99" }
3535
flexbuffers = { version = "2.0.0" }
@@ -45,8 +45,8 @@ opentelemetry-jaeger = { version = "0.20.0" }
4545
postcard = { version = "1.0" }
4646
proof-of-sql = { path = "crates/proof-of-sql" } # We automatically update this line during release. So do not modify it!
4747
proof-of-sql-parser = { path = "crates/proof-of-sql-parser" } # We automatically update this line during release. So do not modify it!
48-
rand = { version = "0.8" }
49-
rand_core = { version = "0.6" }
48+
rand = { version = "0.8", default-features = false }
49+
rand_core = { version = "0.6", default-features = false }
5050
rayon = { version = "1.5" }
5151
serde = { version = "1" }
5252
serde_json = { version = "1" }

crates/proof-of-sql/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ bumpalo = { workspace = true, features = ["collections"] }
3030
bytemuck = { workspace = true }
3131
byte-slice-cast = { workspace = true }
3232
curve25519-dalek = { workspace = true, features = ["serde"] }
33-
chrono = {workspace = true, features = ["serde"]}
33+
chrono = { workspace = true, features = ["serde"] }
3434
derive_more = { workspace = true }
3535
indexmap = { workspace = true, features = ["serde"] }
3636
itertools = { workspace = true }
@@ -40,7 +40,7 @@ num-traits = { workspace = true }
4040
num-bigint = { workspace = true, default-features = false }
4141
postcard = { workspace = true, features = ["alloc"] }
4242
proof-of-sql-parser = { workspace = true }
43-
rand = { workspace = true, optional = true }
43+
rand = { workspace = true, default-features = false, optional = true }
4444
rayon = { workspace = true }
4545
serde = { workspace = true, features = ["serde_derive"] }
4646
serde_json = { workspace = true }
@@ -55,8 +55,8 @@ clap = { workspace = true, features = ["derive"] }
5555
criterion = { workspace = true, features = ["html_reports"] }
5656
opentelemetry = { workspace = true }
5757
opentelemetry-jaeger = { workspace = true }
58-
rand = { workspace = true }
59-
rand_core = { workspace = true }
58+
rand = { workspace = true, default-features = false }
59+
rand_core = { workspace = true, default-features = false }
6060
serde_json = { workspace = true }
6161
tracing = { workspace = true }
6262
tracing-opentelemetry = { workspace = true }

0 commit comments

Comments
 (0)