Skip to content
Projets

À propos

Snapshotable WebAssembly interpreter from scratch

Langages et environnements d’exécution

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
0
in 15 days
+1
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

gabagool logo

gabagool

A WebAssembly interpreter written from scratch.

This project aims to build a serious, fully spec-compliant, performant WASM interpreter whose entire execution state can be serialized, suspended, and restored. gabagool is no_std, so it never touches the host OS.


See demo
Game of Life demo
Each fork snapshots the entire WebAssembly execution state, spawns a brand new process, and resumes exactly where it left off.

Status

As a pure interpreter, it is safe to assume gabagool is spec compliant. gabagool is tested against the WebAssembly spec test suite. 1,960 tests pass out of 2,049 (96%). gabagool passes on arithmetic, control flow, memory, tables, globals, function references, imports/exports, and exceptions. Remaining tests involve supporting SIMD and garbage collection.

gabagool is not focused on performance optimization. No serious profiling/benchmarking has been done (yet!). That said, the goal is to make gabagool performant while preserving its snapshot friendly execution model. gabagool already lowers WASM instructions into a compact, serializable intermediate representation. A future direction is a JIT compiler based on copy and patch compilation.

Current work focuses on how gabagool interacts with its host environment. This includes a robust, virtualized WASI Preview 1 implementation whose state can be snapshotted and restored alongside the interpreter.

Usage

# run the core test suite
uv run download-core-tests.py
cargo t --features core-tests --test core_tests

# compare against the committed CI baseline
python3 check-core-tests.py

# lock newly passing assertions and cases into the baseline
python3 check-core-tests.py --update

# run the component test suite
# you need wasm-tools installed!
cd tests/components && bash fetch_components.sh
cargo t --features component-tests

# run an example wasm program
cargo r -- ./test-programs/stair_climb.wasm stair_climb 20

Reading

https://webassembly.github.io/spec/core/
https://github.com/bytecodealliance/wasmtime/issues/3017
https://github.com/bytecodealliance/wasmtime/issues/4002

Wasm Component Model

https://www.infoq.com/podcasts/web-assembly-component-model/
https://blog.sunfishcode.online/what-is-a-wasm-component/
https://www.fermyon.com/blog/webassembly-component-model
https://github.com/WebAssembly/component-model/blob/main/design/mvp/Explainer.md
https://github.com/WebAssembly/component-model/blob/main/design/mvp/Binary.md
https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md

Copy and patch compilation

https://fredrikbk.com/publications/copy-and-patch.pdf
https://www.youtube.com/watch?v=HxSHIpEQRjs

Explorer des projets similaires

Chargement…