Skip to content

Commit ebe5bfa

Browse files
committed
small fixes
1 parent 9a97917 commit ebe5bfa

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

.github/workflows/rust.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff 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

Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ curve25519-dalek = { version = "4.1.1", features = [
1717
"rand_core",
1818
], default-features = false }
1919
merlin = { 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 }
2222
digest = { version = "0.8.1", default-features = false }
2323
sha3 = { version = "0.8.2", default-features = false }
2424
byteorder = { version = "1.3.4", default-features = false }
@@ -30,6 +30,9 @@ itertools = { version = "0.10.0", default-features = false }
3030
colored = { version = "2.0.0", default-features = false, optional = true }
3131
flate2 = { 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]
3437
criterion = "0.3.1"
3538
typos = "0.10.33"

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ extern crate core;
88
extern crate curve25519_dalek;
99
extern crate digest;
1010
extern crate merlin;
11-
extern crate rand;
1211
extern crate sha3;
1312

1413
#[cfg(feature = "multicore")]

0 commit comments

Comments
 (0)