Skip to content

Commit b2fefe7

Browse files
committed
WASI prototype design, implementation, and documentation.
This adds documents describing the WASI Core API, and an implementation in Wasmtime.
1 parent b0243b2 commit b2fefe7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+12801
-23
lines changed

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ wasmtime-runtime = { path = "wasmtime-runtime" }
3131
wasmtime-jit = { path = "wasmtime-jit" }
3232
wasmtime-obj = { path = "wasmtime-obj" }
3333
wasmtime-wast = { path = "wasmtime-wast" }
34+
wasmtime-wasi = { path = "wasmtime-wasi" }
3435
docopt = "1.0.1"
3536
serde = "1.0.75"
3637
serde_derive = "1.0.75"
@@ -39,5 +40,7 @@ target-lexicon = { version = "0.3.0", default-features = false }
3940
pretty_env_logger = "0.3.0"
4041
file-per-thread-logger = "0.1.1"
4142
wabt = "0.7"
43+
libc = "0.2.50"
44+
errno = "0.2.4"
4245

4346
[workspace]

README.md

+15-14
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,27 @@ utility or as a library embedded in a larger application.
1414
[![Gitter chat](https://badges.gitter.im/CraneStation/CraneStation.svg)](https://gitter.im/CraneStation/Lobby)
1515
![Minimum rustc 1.32](https://img.shields.io/badge/rustc-1.32+-green.svg)
1616

17-
*Wasmtime is complete enough to pass the WebAssembly spec testsuite.* Support for
18-
system APIs is coming soon!
17+
Wasmtime passes the WebAssembly spec testsuite, and supports a new system
18+
API proposal called [WebAssembly System Interface], or WASI.
1919

20-
One goal for this project is to implement [CloudABI](https://cloudabi.org/) using
21-
WebAssembly as the code format, provide [CloudABI system calls] as WebAssembly
22-
host imports, and then port the [Rust CloudABI package] and [CloudABI libc] to it
23-
to support Rust, C, C++, and other toolchains.
20+
There are Rust C, and C++ toolchains that can compile programs with WASI. See
21+
[here][WASI intro] for more information, and [here][WASI tutorial] for a
22+
tutorial on compiling and running programs using WASI and wasmtime, as
23+
well as an overview of the filesystem sandboxing system.
2424

25-
CloudABI is a natural complement for WebAssembly, since WebAssembly provides
26-
sandboxing for code but doesn't have any builtin I/O, and CloudABI provides
27-
sandboxed I/O.
25+
Wasmtime does not yet implement Spectre mitiations, such as those being
26+
pioneered [by](https://www.wasmjit.org/blog/spectre-mitigations-part-1.html)
27+
[wasmjit](https://www.wasmjit.org/blog/spectre-mitigations-part-2.html),
28+
however this is a subject of ongoing research.
2829

2930
[CloudABI]: https://cloudabi.org/
30-
[CloudABI system calls]: https://github.com/NuxiNL/cloudabi#specification-of-the-abi
31-
[Rust CloudABI package]: https://crates.io/crates/cloudabi
32-
[CloudABI libc]: https://github.com/NuxiNL/cloudlibc
31+
[WebAssembly System Interface]: docs/WASI-overview.md
32+
[WASI intro]: docs/WASI-intro.md
33+
[WASI tutorial]: docs/WASI-tutorial.md
3334

3435
Additional goals for Wasmtime include:
35-
- Support a variety of host APIs (not just CloudABI), with fast calling sequences,
36-
and develop proposals for system calls in the WebAssembly
36+
- Support a variety of host APIs (not just WASI Core), with fast calling sequences,
37+
and develop proposals for additional API modules to be part of WASI.
3738
[Reference Sysroot](https://github.com/WebAssembly/reference-sysroot).
3839
- Implement the [proposed WebAssembly C API].
3940
- Facilitate testing, experimentation, and development around the [Cranelift] and

0 commit comments

Comments
 (0)