Skip to content

Commit 83dc528

Browse files
committed
Add wasm32v1-none support
1 parent 5fbd843 commit 83dc528

11 files changed

Lines changed: 89 additions & 368 deletions

File tree

Cargo.toml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ status = "actively-developed"
5555

5656
[features]
5757
default = ["std"]
58-
std = []
58+
std = ["wasm-bindgen?/std", "js-sys?/std"]
5959
macro-diagnostics = ["dep:uuid-macro-internal"]
6060

6161
# NOTE: When adding new features, check the `ci.yml` workflow
@@ -126,21 +126,24 @@ optional = true
126126
version = "1"
127127
default-features = false
128128

129+
# NOTE: `getrandom` will throw a compiler error for the following target configuration when `wasm_js` is not enabled:
130+
# all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
131+
129132
# Private
130133
# (Formally public)
131-
[target.'cfg(not(all(target_arch = "wasm32", target_vendor = "unknown", target_os = "unknown")))'.dependencies.getrandom]
134+
[target.'cfg(not(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))))'.dependencies.getrandom]
132135
version = "0.3"
133136
optional = true
134137

135-
[target.'cfg(all(target_arch = "wasm32", target_vendor = "unknown", target_os = "unknown"))'.dependencies.uuid-rng-internal-lib]
138+
[target.'cfg(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none")))'.dependencies.uuid-rng-internal-lib]
136139
# Work-around lack of support for both `dep:x` and `x/` in MSRV
137140
package = "uuid-rng-internal"
138141
version = "1.16.0"
139142
path = "rng"
140143
optional = true
141144

142145
# Private
143-
[target.'cfg(not(all(target_arch = "wasm32", target_vendor = "unknown", target_os = "unknown")))'.dependencies.rand]
146+
[target.'cfg(not(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))))'.dependencies.rand]
144147
version = "0.9"
145148
optional = true
146149

@@ -169,12 +172,15 @@ optional = true
169172
version = "0.6"
170173

171174
# Private
172-
[target.'cfg(all(target_arch = "wasm32", target_vendor = "unknown", target_os = "unknown"))'.dependencies.wasm-bindgen]
175+
[target.'cfg(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none")))'.dependencies.wasm-bindgen]
176+
default-features = false
177+
features = ["msrv"]
173178
version = "0.2"
174179
optional = true
175180

176181
# Private
177-
[target.'cfg(all(target_arch = "wasm32", target_vendor = "unknown", target_os = "unknown", target_feature = "atomics"))'.dependencies.js-sys]
182+
[target.'cfg(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"), target_feature = "atomics"))'.dependencies.js-sys]
183+
default-features = false
178184
version = "0.3"
179185
optional = true
180186

@@ -190,10 +196,13 @@ version = "1.0"
190196
[dev-dependencies.serde_test]
191197
version = "1.0.56"
192198

193-
[target.'cfg(all(target_arch = "wasm32", target_vendor = "unknown", target_os = "unknown"))'.dev-dependencies.wasm-bindgen]
199+
[target.'cfg(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none")))'.dev-dependencies.wasm-bindgen]
200+
default-features = false
201+
features = ["msrv"]
194202
version = "0.2"
195203

196-
[target.'cfg(all(target_arch = "wasm32", target_vendor = "unknown", target_os = "unknown"))'.dev-dependencies.wasm-bindgen-test]
204+
[target.'cfg(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none")))'.dev-dependencies.wasm-bindgen-test]
205+
default-features = false
197206
version = "0.3"
198207

199208
[dev-dependencies.trybuild]

0 commit comments

Comments
 (0)