• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..04-Jun-2020-

WASI/H03-May-2022-18,19114,391

src/H04-Jun-2020-13,41810,358

wig/H04-Jun-2020-1,4031,130

winx/H04-Jun-2020-837562

yanix/H04-Jun-2020-1,5151,184

Cargo.tomlH A D04-Jun-20201.6 KiB5144

LICENSEH A D04-Jun-202012 KiB221182

LICENSE.cloudabi-utilsH A D04-Jun-20201.3 KiB2521

README.mdH A D04-Jun-20202.8 KiB7352

build.rsH A D04-Jun-2020325 96

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