Skip to content

Commit aa02c3d

Browse files
authored
Merge pull request #524 from wolfv/remove-getrandom
chore: remove unused getrandom
2 parents 6566206 + 8619491 commit aa02c3d

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

.github/workflows/tests.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,20 @@ jobs:
8181
- run: |
8282
cargo test --workspace --no-default-features --features full,rustls-tls,test-registry
8383
84+
check-wasm:
85+
name: Check wasm32-unknown-unknown target
86+
runs-on: ubuntu-latest
87+
steps:
88+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
89+
with:
90+
persist-credentials: false
91+
- uses: dtolnay/rust-toolchain@351f82a4dc29e4159746a068ed925da17341219f # 1.89.0
92+
with:
93+
targets: wasm32-unknown-unknown
94+
- uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
95+
- run: |
96+
cargo check --no-default-features --features wasm --target wasm32-unknown-unknown
97+
8498
doc:
8599
name: Build Documentation
86100
runs-on: ubuntu-latest

Cargo.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ verify = [
8585
"fulcio",
8686
"rekor",
8787
]
88-
wasm = ["chrono/wasmbind", "getrandom/js"]
88+
wasm = ["chrono/wasmbind", "ring/wasm32_unknown_unknown_js"]
8989

9090
[dependencies]
9191
async-trait = { version = "0.1", optional = true, default-features = false }
@@ -122,7 +122,6 @@ elliptic-curve = { version = "0.13", default-features = false, features = [
122122
] }
123123
futures = { version = "0.3", default-features = false, optional = true }
124124
futures-util = { version = "0.3", default-features = false, optional = true }
125-
getrandom = { version = "0.2", default-features = false, optional = true }
126125
hex = { version = "0.4", default-features = false, optional = true, features = [
127126
"std",
128127
] }
@@ -152,15 +151,14 @@ pkcs8 = { version = "0.10", default-features = false, features = [
152151
"std",
153152
] }
154153
pki-types = { package = "rustls-pki-types", version = "1.11", default-features = false }
155-
rand = { version = "0.8", default-features = false, features = [
156-
"getrandom",
157-
"std",
158-
] }
154+
rand = { version = "0.8", default-features = false, features = ["std"] }
159155
regex = { version = "1.10", default-features = false, optional = true }
160156
reqwest = { version = "0.12", default-features = false, features = [
161157
"json",
162158
"multipart",
163159
], optional = true }
160+
# used only by the wasm feature
161+
ring = { version = "0", default-features = false, optional = true }
164162
rsa = { version = "0.9", default-features = false, features = ["std"] }
165163
rustls-webpki = { version = "0.103", default-features = false, features = [
166164
"std",

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ check-features-native-tls:
2727
check-features-rustls-tls:
2828
cargo hack check --feature-powerset --features rustls-tls --skip wasm --skip test-registry --skip native-tls --skip rustls-tls-native-roots
2929

30+
.PHONY: check-wasm
31+
check-wasm:
32+
cargo check --no-default-features --features wasm --target wasm32-unknown-unknown
33+
3034
.PHONY: test
3135
test: fmt lint doc
3236
cargo test --workspace --no-default-features --features full,native-tls,test-registry

0 commit comments

Comments
 (0)