Changelog
View Source0.1.1 (2026-08-29)
- Wasmtime archives come from
wasmtime-runtime-<version>-r<revision>releases (scripts/wasmtime-runtime.rev); a build recipe change gets a new revision instead of replacing pinned assets. Revision 2 rebuilds every archive with the recipe this release ships: the FreeBSD full library now has LTO and panic abort like Wasmtime's own releases. - Hex package lists the C header, the precompiled shims and the examples; ex_doc covers every guide, the design note, contributing and releasing.
0.1.0 (2026-08-29)
First release.
- Compile modules from binary or text, list imports and exports.
- Instantiate with Erlang-backed host functions, WASI preview 1 with explicit capabilities, memory and table caps.
- Call exports with integer, float and v128 values; traps reported by kind.
- Interrupt a call with a timeout or from another process.
- Read and write linear memory from Erlang.
- One OS thread per instance; callers never block inside a NIF.
- Wasmtime 48.0.1, downloaded at build time and linked statically.
- Ownership: Erlang holds a handle, the instance is owned by the handle and by its detached worker thread; messages carry an Erlang reference, never a resource term. No destructor blocks a scheduler.
- A call
timeoutcancels the request by id; its result is dropped in the NIF. A caller that dies has its running call interrupted and its queued calls dropped. A host function calling the instance it runs on is refused withkind => reentrant. Interrupting a guest parked in a host function reportskind => interrupt. - Values cross the boundary through the raw C API so
v128works; the typed path aborts the process on it. serialize/1anddeserialize/1for Wasmtime's precompiled form.read_memory/4,write_memory/4,memory_size/2address an exported memory by name.host => Pidroutes host calls to a dedicated process;handle_host_call/2serves them there.- Worker threads get a 4 MB stack on every platform.
call_async/3andawait/2,3.- Fuel metering:
compile/2withfuel => true,call/4withfuel,fuel_remaining/1;validate/1;traceframes on trap errors;global_get/2,global_set/3,table_size/2,table_grow/3. - Compile options:
opt_levelandproposalsincompile/2andvalidate/2,deserialize/2for matching options,module_options/1. One engine per option set, capped at 32. - WASI stdio without files:
stdin => {binary, Bytes},stdout/stderr => captureread back withread_output/1under anoutput_limit;args/env => inherit. - Streams:
send/2andclose/1feed a running guest;stdin,stdout,stderr => streamand theerlang.send/erlang.recvimports; output arrives as{wasmtime_stream, Ref, Kind, Bytes}in thestreamprocess;inbox_limit;ref/1. Runtime-only builds load the stdin forwarding shim precompiled per platform frompriv/shims. - A
streamstdout or stderr reports itself to the guest as a terminal (fd_fdstat_getshadowed likefd_read), so C libraries line-buffer it: scripts need no flush and CPython no-u. examples/transform: user-defined event transforms, one QuickJS worker per script over streams, with reload, timeouts and memory limits.- References across the boundary:
funcref,externrefand GC values asref()terms in calls, host functions, globals and tables;nulland{i31, N};externref/2,externref_data/1,call_ref/3,4,ref_info/1,table_get/3,table_set/4,table_grow/4,struct_get/2,struct_set/3,array_len/1,array_get/2,array_set/3,gc/1. A dropped ref is unrooted by its destructor. - Runtime-only builds (
WASMTIME_RUNTIME_ONLY=1): no compiler, a 4 MB shared library;features/0reports the linked library's capabilities andcompile/1,{wat, _},serialize/1and thewasioption answerkind => unavailablewhere absent. Automatic source build of the C API for platforms without a prebuilt archive. FreeBSD archives published from this repository.