A Bytecode Alliance project
This crate contains bindings for WASIp2 APIs for the worlds:
This crate is procedurally generated from WIT files using wit-bindgen.
Usage
Depending on this crate can be done by adding it to your dependencies:
Next you can use the APIs in the root of the module like so:
Next you can run this by configuring a runner and using the
wasm32-wasip2 target:
$ cargo run --target wasm32-wasip2 --config 'target."wasm32-wasip2".runner="wasmtime"'
...
Hello, world!
Development
The bulk of the wasip2 crate is generated by the wit-bindgen tool. The
various files can be regenerated from the root of this repository with:
$ ./ci/regenerate.sh
WASI definitions are located in the wit directory of this folder.
Currently they're copied from upstream repositories but are hoped to be better
managed in the future.