Introduce
WebAssembly System Interface, or WASI, is a family of APIs for WebAssembly being designed and standardized through the WASI Subgroup of the W3C WebAssembly Commmunity Group. Initially, the focus is on system-oriented APIs, covering files, networking, and a few other things. Additional domains are expected to be added in the future.
Architecture
To facilitate use of the WASI API, a libc implementation called WASI libc is being developed, which presents a relatively normal musl-based libc interface, implemented on top of a libpreopen-like layer and a system call wrapper layer (derived from the “bottom half” of cloudlibc). The system call wrapper layer makes calls to the actual WASI implementation, which may map these calls to whatever the surrounding environment provides, whether it's native OS resources, JS runtime resources, or something else entirely.
Implementions
WASI 目前有三份实现:
- wasmtime,Mozilla 的 WebAssembly 运行时
- Lucet,Fastly 的 WebAssembly 运行时
- 浏览器垫片(polyfill)
Reference
h
h
h