Skip to content

Commit a0fad60

Browse files
authored
Add support for the experimental wasi-crypto APIs (#2597)
* Add support for the experimental wasi-crypto APIs The sole purpose of the implementation is to allow bindings and application developers to test the proposed APIs. Rust and AssemblyScript bindings are also available as examples. Like `wasi-nn`, it is currently disabled by default, and requires the `wasi-crypto` feature flag to be compiled in. * Rename the wasi-crypto/spec submodule * Add a path dependency into the submodule for wasi-crypto * Tell the publish script to vendor wasi-crypto
1 parent 95822a5 commit a0fad60

21 files changed

Lines changed: 2259 additions & 93 deletions

File tree

.github/workflows/main.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ jobs:
274274
--exclude lightbeam \
275275
--exclude wasmtime-lightbeam \
276276
--exclude wasmtime-wasi-nn \
277+
--exclude wasmtime-wasi-crypto \
277278
--exclude peepmatic \
278279
--exclude peepmatic-automata \
279280
--exclude peepmatic-fuzzing \
@@ -351,6 +352,21 @@ jobs:
351352
env:
352353
RUST_BACKTRACE: 1
353354

355+
# Build and test the wasi-crypto module.
356+
test_wasi_crypto:
357+
name: Test wasi-crypto module
358+
runs-on: ubuntu-latest
359+
steps:
360+
- uses: actions/checkout@v2
361+
with:
362+
submodules: true
363+
- run: rustup target add wasm32-wasi
364+
- name: Install Rust
365+
run: rustup update stable && rustup default stable
366+
- run: ./ci/run-wasi-crypto-example.sh
367+
env:
368+
RUST_BACKTRACE: 1
369+
354370
# Verify that cranelift's code generation is deterministic
355371
meta_determinist_check:
356372
name: Meta deterministic check
@@ -459,6 +475,7 @@ jobs:
459475
--exclude lightbeam \
460476
--exclude wasmtime-lightbeam \
461477
--exclude wasmtime-wasi-nn \
478+
--exclude wasmtime-wasi-crypto \
462479
--exclude peepmatic \
463480
--exclude peepmatic-automata \
464481
--exclude peepmatic-fuzzing \

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
[submodule "crates/wasi-nn/spec"]
1111
path = crates/wasi-nn/spec
1212
url = https://github.com/WebAssembly/wasi-nn
13+
[submodule "crates/wasi-crypto/spec"]
14+
path = crates/wasi-crypto/spec
15+
url = https://github.com/WebAssembly/wasi-crypto.git

0 commit comments

Comments
 (0)