Crates.io | wasmtime-crypto |
lib.rs | wasmtime-crypto |
version | 12.0.2 |
source | src |
created_at | 2023-09-19 16:53:10.665462 |
updated_at | 2023-09-19 16:53:10.665462 |
description | Command-line interface for Wasmtime with the crypto extensions |
homepage | |
repository | https://github.com/wasm-crypto/wasmtime-crypto |
max_upload_size | |
id | 977062 |
size | 15,239,243 |
The currently stable version of the Wasmtime WebAssembly runtime, with support for the WASI Cryptography APIs.
Install the Rust compiler and compile with:
cargo build --release
The resulting executable will be in the target/release
directory.
The library (libwasmtime.so
, libwasmtime.dylib
, libwasmtime.a
)
can be compiled with the following command:
cargo build --release -p wasmtime-c-api
The files can be found in target/release
and
crates/c-api/wasm-c-api/include
.
In this build, the function to enable WASI (wasmtime_linker_define_wasi
)
will also enable the crypto extensions, so that no code change to
existing code depending on libwasmtime
is necessary.
wasmtime run --wasi-modules experimental-wasi-crypto module.wasm
In Rust applications, wasi-crypto
can be used directly with
the stock wasmtime
crate downloaded from crates.io
.
See the wasmtime-crate-usage-example
directory for an example that runs a WebAssembly module with WASI
and WASI-Crypto.