Packages

A WebAssembly runtime implemented in Erlang/OTP

Current section

Files

Jump to
erlang_wasm CHANGELOG.md
Raw

CHANGELOG.md

# Changelog
## 0.1.0
First public release. The versions before it were developed in a private
repository and are not published; this is the whole runtime as one release.
The Hex package is `erlang_wasm`; the OTP application inside it is `wasm`.
```erlang
{deps, [{wasm, {pkg, erlang_wasm}}]}.
```
### What it does
A WebAssembly runtime written in Erlang/OTP. Decoding, validation,
instantiation, execution, linear memory and WASI preview 1 are implemented in
Erlang. The only native code is an optional file NIF that closes a
time-of-check-to-time-of-use window in WASI path resolution, and the runtime
falls back to a pure Erlang resolver when it is absent.
### Proposals
WebAssembly 1.0 core, bulk memory, reference types, multi-value, multiple
memories, memory64, SIMD, relaxed SIMD, tail calls, typed function references,
exception handling, garbage collection, threads and shared memories, sign
extension, and saturating float-to-int conversion.
Both formats are read: the binary format, and the text format as `.wat` modules
and `.wast` scripts.
### WASI
Forty-four preview 1 syscalls. Directories and sockets are granted by naming
what may be reached, with nothing reachable by default. See `docs/wasi.md` and
`docs/security.md`.
### The compiled tier
Hot functions are lowered to Core Erlang, compiled and loaded into a fixed pool
of sixteen pre-interned module names, so no atom is ever derived from a guest's
bytes. Off by default; see `docs/compiled-tier.md` for when it pays and when it
does not.
### Errors and limits
Nothing raises. A malformed binary, an ill-typed module, a trap and a resource
limit all come back as `{error, Error}` carrying a class, a machine-readable
kind, the specification's message text and context. Memory pages, tables and
globals are held by holder tokens whose owning process's death releases them,
so a killed worker cannot leak a page.
### Conformance
64,774 core specification assertions across 215 suites, with an empty skip
baseline, and 65,481 of them replayed through generated code. Seventy-two of
the 72 wasi-testsuite cases pass with the NIF, 68 without it. Neither suite is
vendored; `docs/features.md` says how to clone them.