benoitc/erlang_wasm
72.1
Strong · 15 November 2026
63.3k
lines of production code
Erlang
primary language
5
measurements over time
What this system is
Features
Add build and verification scripts for WebAssembly test fixtures
Added a suite of build and verification scripts to generate and validate the WebAssembly test fixtures used by the integration and conformance suites. The new \scripts/build-component-fixture.sh\ builds component-model test cases (including WASI 0.2 worlds like clocks, sockets, and filesystems) targeting \wasm32-unknown-unknown\ and \wasm32-wasip2\. Language-specific reactor fixtures for Lua, QuickJS, and Python are now built via \scripts/build-lua-reactor.sh\, \scripts/build-quickjs-reactor.sh\, and \scripts/build-python-reactor.sh\, which compile the interpreters as \init()/handle()\ reactors using WASI SDK 34. Additional scripts handle fetching pre-built Python artifacts (\fetch-python-fixture.sh\), extracting CPython link lines (\python-link-line.sh\), building wasmtime's native WASI 0.2 test programs (\build-wasmtime-p2.sh\), and verifying fixture checksums (\verify-fixtures.sh\).
scripts · high confidence
Introduce WASI 0.2 HTTP support with pluggable transports
Components can now make outbound HTTP requests and host HTTP reactors using the WASI 0.2 \wasi:http\ interface. The implementation provides a pluggable transport layer, defaulting to HTTP/1.1 (\wasi\_http\_h1\) but also supporting HTTP/2 (\wasi\_http\_h2\), allowing guests to perform requests over granted network authorities with configurable TLS and timeouts. Additionally, a new HTTP listener (\wasi\_http\_listener\) enables hosting \wasi:http\ reactor components, translating incoming HTTP requests into component handles and returning responses. Also in this area: 5 commits (0 fixes) modifying src.
src · medium confidence · unverified
Introduce language-neutral worker kernel for script execution
Added a new execution bootstrap (\script\_v1\) that provides a consistent interface for running tenant scripts in both QuickJS and CPython environments. This kernel enforces a strict contract where tenants define a single \main(context)\ entry point, ensuring safe, streaming output via a delimiter marker rather than buffered stdout. It handles context loading from \/context.json\, manages error framing for non-serializable results or missing entry points, and isolates execution by loading tenant modules by explicit path to prevent access to host modules.
priv · high confidence
New WASM worker adapters and cleanup infrastructure
This change introduces a new worker subsystem in \src/worker\ featuring adapters for JavaScript (both command and reactor modes), Python (reactor mode), and Lua, enabling execution of these languages via WebAssembly snapshots. It also adds a robust cleanup management system, including a node-wide cleanup manager, per-request cleanup stewards, and a dynamic supervisor, to handle resource teardown and state recovery reliably. Additionally, a comprehensive conformance test suite is provided to validate adapter behavior against the kernel's acceptance rules. Also in this area: 3 commits (0 fixes) modifying src/worker.
src/worker · medium confidence · unverified
New benchmark harnesses for JIT adoption, allocation, and request latency
Added a suite of new benchmark modules in \bench/paths\ to measure specific performance characteristics of the WASM runtime. \adopt.erl\ verifies whether a second instance can adopt compiled code raised by a first, one-call guest. \allocwords.erl\ provides a per-process heap allocation estimator using GC trace events, replacing node-wide statistics. \compileheap.erl\ compares memory usage across OTP, inline, and child compiler processes. \guestarm.erl\ measures the cost of a single guest request startup. \phasing\_adapter.erl\ times the five adapter boundaries of a worker request. \pyarms.erl\ profiles four CPython execution configurations (cold, pre-lowered, whole, adopted). \reqbench.erl\ drives a pool of script workers to measure throughput and queue depths. \restorebits.erl\ isolates the time spent in \wasm:restore/3\ components (new, alloc, fill, runs).
bench/paths · high confidence
Behavioural changes
10 commits (0 fixes) modifying src/component
A change to existing behaviour in src/component — 10 commits, 5 files: “Keep the single-core path unless an interface function's name collides”; “Call a composed component's async export, sharing streams and futures”; “Let a stackful waiter run another component's ready tasks”; and 7 more. Also in this area: 1 commit (0 fixes) modifying src/component; 14 commits (1 fix) modifying src/component.
src/component, src/wasi · medium confidence · unverified
5 commits (0 fixes) modifying bench/cross
A change to existing behaviour in bench/cross — 5 commits, 14 files: “Add table-call, f64 and block-result rows to the comparison harness”; “Measure erlang\_wasm against erlang-wasmtime again, on 0.9.x”; “Clear the cold-compile cache on every attempt”; and 2 more.
bench/cross · medium confidence · unverified
Documentation overhaul and new WASI 0.2 interop fixtures
The project now includes \AGENTS.md\ and \CLAUDE.md\ to guide AI coding agents, and the \README\ has been restructured with a task-oriented 'Where to start' table and a new documentation index. The \rebar.config\ has been updated to include \h1\ and \h2\ dependencies for WASI HTTP support, and the documentation build now includes a new set of runnable examples and guides. Additionally, new fixture directories for wasmtime p2 interop tests have been added to \.gitignore\. Also in this area: 9 commits (0 fixes) modifying (repo-wide); 8 commits (1 fix) modifying (repo-wide).
(repo-wide) · low confidence · unverified
Hardened WASI file backend against escapes and DoS
The native WASI file backend now prevents path-escape vulnerabilities and directory-read denial-of-service attacks. Symlink resolution for stat and set-times operations is performed internally with strict depth and budget limits, ensuring that relative symlinks cannot traverse outside the preopened sandbox. Directory listings are optimized by lazily opening and reusing a duplicated file descriptor, avoiding costly rescans on every read call.
_c\src · high confidence
Renamed script\_worker to qjs\_worker to clarify its role as a baseline interpreter
The example module previously named \script\_worker\ has been renamed to \qjs\_worker\ to better reflect that it is a specific implementation using QuickJS rather than a generic script runner. This change updates the module name, documentation references, and temporary file prefixes throughout the example code. The commit notes that this module now serves as the unchanged baseline against which a new language-neutral worker kernel is measured, distinguishing the specific JavaScript interpreter from the broader kernel concept.
examples · high confidence
Snapshot support and memory image tracking in instance and memory records
The \wasm\ and \wasm\_exec\ records now include fields to support instance snapshots and provenance tracking: \leases\ (an atomics reference for snapshot state and reader counts), \module\_handle\ (to retain the original module cache handle for provenance), and \shared\_ir\ (to publish lowered bodies node-wide). A new \wasm\_snapshot\_budget.hrl\ header defines the persistent term key and version for the node-wide snapshot byte-budget counter. Additionally, \wasm\_memory.hrl\ introduces new indices for image bytes, image data, tables, and arena, replacing the previous single size index to support reading restored memory through a page table over a shared image. Also in this area: 1 commit (0 fixes) modifying include; 3 commits (0 fixes) modifying include.
include · low confidence · unverified
Test coverage
1 commit adding/updating tests in test/audit/raw/ahead-prepare; 1 commit adding/updating tests in test/audit/raw/async-subtasks; 1 commit adding/updating tests in test/audit/raw/async-targets; 1 commit adding/updating tests in test/audit/raw/auto-share; 1 commit adding/updating tests in test/audit/raw/compiled-gaps; 1 commit adding/updating tests in test/audit/raw/http-limits; 1 commit adding/updating tests in test/audit/raw/iface-declared; 1 commit adding/updating tests in test/audit/raw/lifetime; 1 commit adding/updating tests in test/audit/raw/stackful-fibers; 1 commit adding/updating tests in test/audit/raw/vs-harness-self; 1 commit adding/updating tests in test/audit/raw/wasi3-serving; 2 commits adding/updating tests in test/audit/raw/wasi3; 3 commits adding/updating tests in test/audit/raw/pool-image; Add WASI 0.2 component fixtures and property tests for the Canonical ABI; Added test fixtures and documentation for Lua, CPython, and QuickJS language runtimes; Added test fixtures for WASI 0.2 compliance testing; Added test fixtures for composed Wasm components; Added test support adapters for WASI and component runtime verification; Added tests for composed counter components; Expanded component-model test fixtures for WASI 0.2 and Canonical ABI validation.
Dependencies
Add component test fixtures using wit-bindgen 0.62
Added a suite of new test fixtures under test/fixtures/component/ (including asyncimp, asyncval, counter, echo, wasifs, wasisock, and others) to support testing the WebAssembly Component Model. These Rust-based fixtures depend on wit-bindgen version 0.62 (or wit-bindgen-rt 0.44.0 for composed components) and are configured as cdylib crates or binaries, providing the necessary code generation bindings for WASI interfaces and component composition scenarios.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 69 → 72 (+3.3)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 75 → 68 (-6.7)
- Architecture 88 → 100 (+12.2)
- Maturity 65 → 68 (+3.3)
- Readiness 61 → 68 (+6.4)
- Security 100 → 95 (-5.3)
- Event Sourcing 100 → 100 (+0.0)
Resolved (42)
- Duplicated block (5 lines × 2) (src/component/wasm_component_link.erl)
- Duplicated block (6 lines × 2) (bench/paths/subset.erl)
- Duplicated block (6 lines × 2) (src/wasi/wasi_http.erl)
- Duplicated block (8 lines × 2) (src/worker/wasm_javascript_command.erl)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- …and 22 more
New (170)
- Duplicated block (5 lines × 2) (src/component/wasm_component_link.erl)
- Duplicated block (5 lines × 2) (src/wasi/wasi_http_h2.erl)
- Duplicated block (5 lines × 2) (src/wasi/wasi_p3_filesystem.erl)
- Duplicated block (6 lines × 2) (src/wasi/wasi_http_h1.erl)
- Duplicated block (8 lines × 2) (src/wasi/wasi_http_h1.erl)
- Duplicated block (8 lines × 2) (src/worker/wasm_javascript_command.erl)
- Edited copies of one member (3 members, 10+ corresponding lines) (src/wasi/wasi_p2_filesystem.erl)
- Edited copies of one member (3 members, 10+ corresponding lines) (src/wasi/wasi_p2_sockets.erl)
- Edited copies of one member (3 members, 12+ corresponding lines) (src/worker/wasm_javascript_command.erl)
- Edited copies of one member (3 members, 13+ corresponding lines) (scripts/build-snapshot-fixtures.py)
- Edited copies of one member (3 members, 14+ corresponding lines) (examples/qjs_worker.erl)
- Edited copies of one member (3 members, 16+ corresponding lines) (bench/paths/densitybench.erl)
- Edited copies of one member (3 members, 19+ corresponding lines) (src/wasi/wasi_p2_sockets.erl)
- Edited copies of one member (3 members, 2+ corresponding lines) (src/wasm_exec.erl)
- Edited copies of one member (3 members, 3+ corresponding lines) (bench/paths/reactorlib.erl)
- Edited copies of one member (3 members, 3+ corresponding lines) (src/wasm_leb128.erl)
- Edited copies of one member (3 members, 4+ corresponding lines) (src/component/wasm_component_link.erl)
- Edited copies of one member (3 members, 4+ corresponding lines) (src/wasm_simd.erl)
- Edited copies of one member (3 members, 5+ corresponding lines) (src/component/wasm_component_types.erl)
- Edited copies of one member (3 members, 5+ corresponding lines) (src/wasi/wasi_preview1.erl)
- …and 150 more
Changes since last survey
- 148 commits — 142 feature/other, 6 fixes
By area
- (repo) — 32 commits
- (root) — 28 commits
- src/component — 18 commits
- src/wasi — 13 commits
- test/audit — 13 commits
- test/fixtures — 5 commits
- .github/workflows — 4 commits
- src/wasm_core.erl — 4 commits
- src/worker — 4 commits
- bench/cross — 3 commits
- docs/security.md — 2 commits
- include/wasm_validate.hrl — 2 commits
- src/wasm_engine.erl — 2 commits
- test/wasm_wasi2_http_limits_SUITE.erl — 2 commits
- .github/dependabot.yml — 1 commit
- c_src/wasi_file_nif.c — 1 commit
- docs/component-internals.md — 1 commit
- docs/components.md — 1 commit
- docs/examples — 1 commit
- scripts/build-wasmtime-p2.sh — 1 commit
Notable commits
- fix: Cover the remaining lifetime defects with regression cases
- fix: Fetch the specification suites at fixed commits
- fix: Fix four async runtime defects a 0.3 HTTP guest hit
- fix: Make one pull request per feature or defect family a rule
- fix: Note the lifetime fixes in the changelog
- fix: Record what the lifetime fixes cost
- change: Add table-call, f64 and block-result rows to the comparison harness
- change: Ask for pull request descriptions in plain English
- change: Bind async host imports on components that skip the linker
- change: Bind detached children to the process responsible for them
- change: Bound a worker's start with a deadline
- change: Bound every HTTP body a guest writes
- change: Build a listener's imports once, not per request
- change: Build arrays of v128 from data segments
- change: Bump actions/cache from 4.3.0 to 6.1.0
- change: Bump actions/checkout from 4.4.0 to 7.0.1
- change: Call a composed component's async export, sharing streams and futures
- change: Call a synchronous interface function as its canon lift declares
- change: Call a table target of the same unit locally in compiled code
- change: Call an async export's lift and callback as its canon lift declares
- …and 128 more
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
benoitc/erlang_wasm was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 630be54e011c43393e916594b131b943d37f6d65 — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.