Skip to content

Commit

Permalink
Enable getrandom/js feature and test wasm32-unknown-unknown in CI (
Browse files Browse the repository at this point in the history
  • Loading branch information
brycx committed Nov 11, 2021
1 parent a10823f commit 1d810aa
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,25 @@ jobs:
with:
command: build
args: --no-default-features

# https://rustwasm.github.io/docs/book/reference/add-wasm-support-to-crate.html#maintaining-ongoing-support-for-webassembly
web_assembly:
name: WebAssembly - Release build
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- wasm32-unknown-unknown
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.arch }}
override: true
- uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features --target ${{ matrix.arch }}
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ default-features = false

[dependencies.getrandom]
version = "0.2"
features = [ "js" ]

[dependencies.ct-codecs]
version = "1.1.1"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This library includes:
- [x] Pure-Rust implementation of the Version 4 and 2 protocol
- [x] PASERK support (limited amount of PASERK-types)
- [x] `#![no_std]` (with default-features disabled) and `#![forbid(unsafe_code)]`
- [x] WASM-friendly (`wasm32-unknown-unknown` using `#![no_std]`)
- [x] Fuzzing targets
- [x] Test vectors
- [x] Usage examples
Expand Down

0 comments on commit 1d810aa

Please sign in to comment.