| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | 15-May-2026 | - | ||||
| src/ | H | 15-May-2026 | - | 6,988 | 5,913 | |
| tests/all/ | H | 15-May-2026 | - | 604 | 564 | |
| witx/ | H | 15-May-2026 | - | 2,534 | 2,348 | |
| Cargo.toml | H A D | 15-May-2026 | 3.1 KiB | 102 | 90 | |
| LICENSE | H A D | 15-May-2026 | 12 KiB | 221 | 182 | |
| README.md | H A D | 15-May-2026 | 2.4 KiB | 62 | 44 |
README.md
1<div align="center"> 2 <h1><code>wasi-common</code></h1> 3 4<strong>A <a href="https://bytecodealliance.org/">Bytecode Alliance</a> project</strong> 5 6 <p> 7 <strong>A library providing a common implementation of WASI hostcalls for re-use in any WASI-enabled runtime.</strong> 8 </p> 9 10 <p> 11 <a href="https://crates.io/crates/wasi-common"><img src="https://img.shields.io/crates/v/wasi-common.svg?style=flat-square" alt="Crates.io version" /></a> 12 <a href="https://crates.io/crates/wasi-common"><img src="https://img.shields.io/crates/d/wasi-common.svg?style=flat-square" alt="Download" /></a> 13 <a href="https://docs.rs/wasi-common/"><img src="https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square" alt="docs.rs docs" /></a> 14 </p> 15</div> 16 17The `wasi-common` crate will ultimately serve as a library providing a common implementation of 18WASI hostcalls for re-use in any WASI (and potentially non-WASI) runtimes 19such as [Wasmtime] and [Lucet]. 20 21The library is an adaption of [lucet-wasi] crate from the [Lucet] project, and it is 22currently based on [40ae1df][lucet-wasi-tracker] git revision. 23 24Please note that the library requires Rust compiler version at least 1.37.0. 25 26[Wasmtime]: https://github.com/bytecodealliance/wasmtime 27[Lucet]: https://github.com/fastly/lucet 28[lucet-wasi]: https://github.com/fastly/lucet/tree/master/lucet-wasi 29[lucet-wasi-tracker]: https://github.com/fastly/lucet/commit/40ae1df64536250a2b6ab67e7f167d22f4aa7f94 30 31## Supported syscalls 32 33### *nix 34In our *nix implementation, we currently support the entire [WASI API] 35with the exception of the `proc_raise` hostcall, as it is expected to 36be dropped entirely from WASI. 37 38[WASI API]: https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md 39 40### Windows 41In our Windows implementation, we currently support the minimal subset of [WASI API] 42which allows for running the very basic "Hello world!" style WASM apps. More coming shortly, 43so stay tuned! 44 45## Development hints 46When testing the crate, you may want to enable and run full wasm32 integration testsuite. This 47requires `wasm32-wasip1` target installed which can be done as follows using [rustup] 48 49``` 50rustup target add wasm32-wasip1 51``` 52 53[rustup]: https://rustup.rs 54 55Now, you should be able to run the integration testsuite by running `cargo test` on the 56`test-programs` package with `test-programs/test_programs` feature enabled: 57 58``` 59cargo test --features test-programs/test_programs --package test-programs 60``` 61 62