Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 04-Jun-2020 | - | ||||
WASI/ | H | 03-May-2022 | - | 18,191 | 14,391 | |
src/ | H | 04-Jun-2020 | - | 13,418 | 10,358 | |
wig/ | H | 04-Jun-2020 | - | 1,403 | 1,130 | |
winx/ | H | 04-Jun-2020 | - | 837 | 562 | |
yanix/ | H | 04-Jun-2020 | - | 1,515 | 1,184 | |
Cargo.toml | H A D | 04-Jun-2020 | 1.6 KiB | 51 | 44 | |
LICENSE | H A D | 04-Jun-2020 | 12 KiB | 221 | 182 | |
LICENSE.cloudabi-utils | H A D | 04-Jun-2020 | 1.3 KiB | 25 | 21 | |
README.md | H A D | 04-Jun-2020 | 2.8 KiB | 73 | 52 | |
build.rs | H A D | 04-Jun-2020 | 325 | 9 | 6 |
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 socket hostcalls: 36- `sock_recv` 37- `sock_send` 38- `sock_shutdown` 39 40We expect these to be implemented when network access is standardised. 41 42We also currently do not support the `proc_raise` hostcall, as it is expected to 43be dropped entirely from WASI. 44 45[WASI API]: https://github.com/WebAssembly/WASI/blob/master/phases/snapshot/docs.md 46 47### Windows 48In our Windows implementation, we currently support the minimal subset of [WASI API] 49which allows for running the very basic "Hello world!" style WASM apps. More coming shortly, 50so stay tuned! 51 52## Development hints 53When testing the crate, you may want to enable and run full wasm32 integration testsuite. This 54requires `wasm32-wasi` target installed which can be done as follows using [rustup] 55 56``` 57rustup target add wasm32-wasi 58``` 59 60[rustup]: https://rustup.rs 61 62Now, you should be able to run the integration testsuite by running `cargo test` on the 63`test-programs` package with `test-programs/test_programs` feature enabled: 64 65``` 66cargo test --features test-programs/test_programs --package test-programs 67``` 68 69## Third-Party Code 70Significant parts of our hostcall implementations are derived from the C implementations in 71`cloudabi-utils`. See [LICENSE.cloudabi-utils](LICENSE.cloudabi-utils) for license information. 72 73