Skip to content

Commit f03369a

Browse files
committed
chore(cargo): Update getrandom to 0.3.2.
This patch deduplicates `getrandom` where it was present in 2 versions. It also updates `getrandom` to 0.3.2.
1 parent 47f6ed6 commit f03369a

File tree

8 files changed

+51
-36
lines changed

8 files changed

+51
-36
lines changed

Cargo.lock

Lines changed: 41 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ eyeball-im-util = "0.9.0"
3939
futures-core = "0.3.31"
4040
futures-executor = "0.3.31"
4141
futures-util = "0.3.31"
42-
getrandom = { version = "0.2.15", default-features = false }
42+
getrandom = { version = "0.3.2", default-features = false }
4343
gloo-timers = "0.3.0"
4444
growable-bloom-filter = "2.1.1"
4545
hkdf = "0.12.4"

crates/matrix-sdk-base/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ thiserror = { workspace = true }
7676
tracing = { workspace = true }
7777
uniffi = { workspace = true, optional = true }
7878

79+
[target.'cfg(target_arch = "wasm32")'.dependencies]
80+
getrandom = { workspace = true, features = ["wasm_js"] }
81+
7982
[dev-dependencies]
8083
assert_matches = { workspace = true }
8184
assert_matches2 = { workspace = true }

crates/matrix-sdk-common/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ insta = { workspace = true }
5757
tokio = { workspace = true, features = ["rt", "macros"] }
5858

5959
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
60-
# Enable the JS feature for getrandom.
61-
getrandom = { workspace = true, default-features = false, features = ["js"] }
60+
getrandom = { workspace = true, features = ["wasm_js"] }
6261
js-sys = { workspace = true }
6362

6463
[lints]

crates/matrix-sdk-indexeddb/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ zeroize = { workspace = true }
4444
sha2 = { workspace = true }
4545

4646
[target.'cfg(target_arch = "wasm32")'.dependencies]
47-
# for wasm32 we need to activate this
48-
getrandom = { workspace = true, features = ["js"] }
47+
getrandom = { workspace = true, features = ["wasm_js"] }
4948

5049
[dev-dependencies]
5150
assert_matches = { workspace = true }

crates/matrix-sdk-store-encryption/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ rust-version = { workspace = true }
1111
rustdoc-args = ["--cfg", "docsrs"]
1212

1313
[features]
14-
js = ["dep:getrandom", "getrandom?/js"]
14+
js = ["dep:getrandom", "getrandom?/wasm_js"]
1515

1616
[dependencies]
1717
base64 = { workspace = true }

crates/matrix-sdk-store-encryption/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ used for non-Matrix data, users need to ensure:
7373
to a DOS attack.
7474
2. The `StoreCipher` is periodically rotated/rekeyed.
7575

76-
# WASM support
76+
# Wasm support
7777

7878
This crate relies on the `random` and `getrandom` crates which don't support
79-
WASM automatically.
79+
Wasm automatically.
8080

8181
Either turn the `js` feature on directly on this crate or depend on `getrandom`
8282
with the `js` feature turned on. More info can be found in the [`getrandom`

testing/matrix-sdk-test/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ tracing-subscriber = { workspace = true, features = ["env-filter"] }
3636
wiremock = { workspace = true }
3737

3838
[target.'cfg(target_arch = "wasm32")'.dependencies]
39-
getrandom = { version = "0.2.6", default-features = false, features = ["js"] }
39+
getrandom = { workspace = true, features = ["wasm_js"] }
4040
wasm-bindgen-test = "0.3.33"
4141

4242
[lints]

0 commit comments

Comments
 (0)