Skip to content

wasm-crypto/wasmtime-crypto

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Wasmtime and libwasmtime, with crypto extensions

The currently stable version of the Wasmtime WebAssembly runtime, with support for the WASI Cryptography APIs.

Installation

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.

Usage

wasmtime run --wasi-modules experimental-wasi-crypto module.wasm

WASI-Crypto when wasmtime is used as a Rust dependency

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.

About

Wasmtime with support for the crypto extensions.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 70.9%
  • WebAssembly 19.8%
  • Common Lisp 8.0%
  • C 1.1%
  • Shell 0.1%
  • JavaScript 0.1%