File tree Expand file tree Collapse file tree 3 files changed +21
-14
lines changed
Expand file tree Collapse file tree 3 files changed +21
-14
lines changed Original file line number Diff line number Diff line change @@ -24,19 +24,24 @@ jobs:
2424 command: build
2525 args: --examples --benches --verbose
2626
27- build-wasm :
27+ build_wasm :
2828 runs-on: ubuntu-latest
2929 steps:
30- - uses : actions/checkout@v2
31- - name : Wasm build
32- uses : actions-rs/toolchain@v1
33- with :
34- toolchain : stable
35- target : wasm32-unknown-unknown
36- - uses : actions-rs/cargo@v1
37- with :
38- command : build
39- args : --no-default-features --target wasm32-unknown-unknown
30+ - uses: actions/checkout@v2
31+ - name: Install
32+ run: rustup default stable
33+ - name: Build without std
34+ run: cargo build --no-default-features --verbose
35+ - name: Run tests without std
36+ run: cargo test --no-default-features --verbose
37+ - name: Build examples without std
38+ run: cargo build --examples --no-default-features --verbose
39+ - name: Install wasm32-wasi target
40+ run: rustup target add wasm32-wasi
41+ - name: Install wasm32-unknown-unknown target
42+ run: rustup target add wasm32-unknown-unknown
43+ - name: Build for target wasm-wasi
44+ run: RUSTFLAGS="" cargo build --target=wasm32-wasi --no-default-features --verbose
4045
4146 test:
4247 runs-on: ubuntu-latest
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ curve25519-dalek = { version = "4.1.1", features = [
1717 " rand_core" ,
1818], default-features = false }
1919merlin = { version = " 3.0.0" , default-features = false }
20- rand = " 0.8"
21- rand_core = { version = " 0.6" , default-features = false , features = [ " getrandom " ] }
20+ rand = " 0.8.5 "
21+ rand_core = { version = " 0.6" , default-features = false }
2222digest = { version = " 0.8.1" , default-features = false }
2323sha3 = { version = " 0.8.2" , default-features = false }
2424byteorder = { version = " 1.3.4" , default-features = false }
@@ -30,6 +30,9 @@ itertools = { version = "0.10.0", default-features = false }
3030colored = { version = " 2.0.0" , default-features = false , optional = true }
3131flate2 = { version = " 1.0.14" }
3232
33+ [target .'cfg(target_arch = "wasm32")' .dependencies ]
34+ getrandom = { version = " 0.2.15" , default-features = false , features = [" js" ] }
35+
3336[dev-dependencies ]
3437criterion = " 0.3.1"
3538typos = " 0.10.33"
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ extern crate core;
88extern crate curve25519_dalek;
99extern crate digest;
1010extern crate merlin;
11- extern crate rand;
1211extern crate sha3;
1312
1413#[ cfg( feature = "multicore" ) ]
You can’t perform that action at this time.
0 commit comments