liveBook · Manning

WASI

As explained in Refactoring to Rust

WASI is a standardized system interface that allows WebAssembly programs to access operating-system-like services in a portable way.

The WebAssembly System Interface (WASI) is a standard interface that lets WebAssembly (Wasm) programs access operating-system-like services portably. A compatible runtime implements the interface, allowing a Wasm module to run outside the browser or be used by a host application. section 10.0 section 10.8

WASI is an interface, not a runtime itself. WasmEdge is one runtime implementation and provides an SDK for applications that consume Wasm modules. The low-level protocols between modules and their host form an application binary interface (ABI). section 10.0 section 10.8

A host can also define an application-specific interface with expected inputs and outputs. Modules that implement that interface can be swapped without changing the host; a host designed for it can even swap modules without stopping. This application interface is distinct from WASI’s system interface. section 10.1 section 10.0

A CLI search tool

A command-line search tool can use the WasmEdge SDK to consume Wasm. The runtime and module communicate through sandboxed linear memory; functions in the module allocate and deallocate memory for that communication. section 10.8

How Refactoring to Rust covers it

How deep it goes
Explains host interfaces and sandboxed linear memory, including module allocation and deallocation.
Examples
Uses a CLI search tool and replaceable Wasm modules to illustrate runtime integration.
What you can do after
Apply it via the WasmEdge SDK to build an application that consumes Wasm.
How it connects
Connects WASI with WebAssembly, application binary interfaces, sandboxing, and linear memory.

Also explained in

Compare how 3 books explain WASI →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Refactoring to Rust. The section links point to the parts of the book it draws on.