Home

WASI

WASI, the WebAssembly System Interface, is a modular, platform-agnostic API that enables WebAssembly modules to perform system-level tasks outside a web browser. It provides a lightweight, secure abstraction layer so a Wasm module can access resources such as files, network sockets, time, randomness, and environment variables through host facilities, while maintaining strong sandboxing.

Unlike browser APIs, WASI is designed for standalone runtimes and host environments. It uses a capability-based

Support for WASI is provided by standalone Wasm runtimes such as Wasmtime, Wasmer, and WAsmEdge, and by

Development of WASI began as an open standard developed by the WebAssembly community with participation from

model
in
which
access
to
resources
is
granted
through
the
host
when
the
module
is
instantiated.
The
interface
emphasizes
portability
across
operating
systems
and
architectures.
The
API
includes
file
descriptor
operations,
path-based
filesystem
access
via
preopened
directories,
environment
and
argument
handling,
clock
and
time,
randomness,
and
process
lifecycle
controls
like
exit.
It
aims
to
be
small
and
modular,
so
runtimes
can
implement
only
what
they
need.
toolchains
that
generate
WASI-compatible
binaries.
In
browsers,
WebAssembly
currently
relies
on
Web
APIs
rather
than
WASI;
WASI
is
intended
for
non-browser
execution,
server-side
tooling,
and
embedded
environments.
The
existence
of
WASI
has
spurred
efforts
to
port
existing
C/C++
libraries
to
WebAssembly
via
a
WASI-compatible
libc
such
as
WASI-libc
and
new
libc
implementations.
multiple
vendors.
It
is
maintained
as
an
open,
cross-platform
standard
intended
to
enable
WebAssembly
modules
to
be
used
as
universal,
portable
components
in
server,
edge,
and
embedded
contexts.