File tree Expand file tree Collapse file tree 4 files changed +9
-2
lines changed
tools/build-wasm-example/src Expand file tree Collapse file tree 4 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -222,6 +222,8 @@ jobs:
222
222
with :
223
223
target : wasm32-unknown-unknown
224
224
- name : Check wasm
225
+ env :
226
+ RUSTFLAGS : --cfg getrandom_backend="wasm_js"
225
227
run : cargo check --target wasm32-unknown-unknown
226
228
227
229
build-wasm-atomics :
@@ -247,7 +249,7 @@ jobs:
247
249
- name : Check wasm
248
250
run : cargo check --target wasm32-unknown-unknown -Z build-std=std,panic_abort
249
251
env :
250
- RUSTFLAGS : " -C target-feature=+atomics,+bulk-memory -D warnings"
252
+ RUSTFLAGS : ' -C target-feature=+atomics,+bulk-memory -D warnings --cfg getrandom_backend="wasm_js" '
251
253
252
254
markdownlint :
253
255
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -112,6 +112,8 @@ jobs:
112
112
cd ../..
113
113
114
114
- name : First Wasm build
115
+ env :
116
+ RUSTFLAGS : --cfg getrandom_backend="wasm_js"
115
117
run : |
116
118
cargo build --release --example testbed_ui --target wasm32-unknown-unknown
117
119
Original file line number Diff line number Diff line change @@ -582,6 +582,7 @@ smol-hyper = "0.1"
582
582
ureq = { version = " 3.0.8" , features = [" json" ] }
583
583
584
584
[target .'cfg(target_arch = "wasm32")' .dev-dependencies ]
585
+ getrandom = { version = " 0.3" , features = [" wasm_js" ] }
585
586
wasm-bindgen = { version = " 0.2" }
586
587
web-sys = { version = " 0.3" , features = [" Window" ] }
587
588
Original file line number Diff line number Diff line change @@ -77,7 +77,9 @@ fn main() {
77
77
sh,
78
78
"cargo build {parameters...} --profile release --target wasm32-unknown-unknown --example {example}"
79
79
) ;
80
- cmd. run ( ) . expect ( "Error building example" ) ;
80
+ cmd. env ( "RUSTFLAGS" , "--cfg getrandom_backend=\" wasm_js\" " )
81
+ . run ( )
82
+ . expect ( "Error building example" ) ;
81
83
82
84
cmd ! (
83
85
sh,
You can’t perform that action at this time.
0 commit comments