Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable getrandom/js feature and test wasm32-unknown-unknown in CI #37

Merged
merged 2 commits into from
Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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