MCPcopy Index your code
hub / github.com/DLR-FT/wasm-interpreter

github.com/DLR-FT/wasm-interpreter @v0.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.0 ↗ · + Follow
921 symbols 2,948 edges 104 files 154 documented · 17% updated 4d agov0.1.0 · 2025-12-16★ 3749 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

wasm-interpreter

Website  •  Features  •  Resources

ci status code coverage license license

A minimal in-place interpreter for WebAssembly bytecode (almost without) dependencies while being no_std.

Features

  • In-place interpretation: No intermediate representation, directly interprets WebAssembly bytecode. This allows for fast start-up times.
  • no_std support: The interpreter requires only Rust's core and alloc libraries allowing its use in various environments, such as bare-metal systems.
  • Minimal dependencies: The interpreter requires only two dependencies: log, libm.
  • Compliance with specification: The interpreter passes all tests from the official WebAssembly testsuite, except for the unfinished proposal tests. See GlobalConfig in tests/specification/mod.rs for the default spec-test filter regex.
  • Host functions: The host system can provide functions for Wasm code to call.
  • Fuel & resumable execution: A fuel mechanism is used to halt execution once fuel runs out. Then fuel can be refilled and execution resumed.

For information on other features, visit our requirements page.

Planned

  • C bindings: The interpreter can be used from C code.
  • Migratability: Wasm instances can be transferred between systems during their execution.
  • Threading: There are multiple threading proposals, but we have not yet chosen a specific one. Some options are shared-everything-threads, threads, wasi-threads.

Not planned

Multi-memory proposal, GC proposal

Resources

  • A fast in-place interpreter by Ben L. Titzer: https://arxiv.org/abs/2205.01183
  • WebAssembly spec: https://webassembly.github.io/spec/core/index.html
  • WebAssembly Opcode Table: https://pengowray.github.io/wasm-ops/
  • Compiler/Interpreter Know-How Gist Compilation: https://gist.github.com/o11c/6b08643335388bbab0228db763f99219
  • Mozilla Developer Network WebAssembly Homepage: https://developer.mozilla.org/en-US/docs/WebAssembly

License

Licensed under either of

  • Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Copyright

Copyright © 2024-2025 Deutsches Zentrum für Luft- und Raumfahrt e.V. (DLR) Copyright © 2024-2025 OxidOS Automotive SRL

Extension points exported contracts — how you extend this code

InteropValue (Interface)
An [InteropValue] is a Rust types that can be converted into a WASM [Value]. This trait is intended to simplify translat [9 …
src/execution/interop.rs
WasmReadable (Interface)
(no doc) [18 implementers]
src/core/reader/mod.rs
Addr (Interface)
A trait for all address types. This is used by [`AddrVec`] to create and read address types. [7 implementers]
src/execution/store/addrs.rs
ImportSubTypeRelation (Interface)
https://webassembly.github.io/spec/core/valid/types.html#import-subtyping [2 implementers]
src/core/reader/types/mod.rs
InteropValueList (Interface)
An [InteropValueList] is an iterable list of [InteropValue]s (i.e. Rust types that can be converted into WASM [Value]s). [5 …
src/execution/interop.rs
Config (Interface)
Trait that allows user specified configuration for various items during interpretation. Additionally, the types implemen [3 …
src/execution/config.rs
LittleEndianBytes (Interface)
Convert from and to the little endian byte representation of a value `N` denotes the number of bytes required for the l [2 …
src/execution/little_endian.rs

Core symbols most depended-on inside this repo

unwrap_validated
called by 902
src/execution/assert_validated.rs
pop_value
called by 667
src/execution/value_stack.rs
instance_export
called by 404
src/execution/store/mod.rs
as_func
called by 390
src/execution/store/mod.rs
validate
called by 338
src/validation/mod.rs
module_instantiate
called by 319
src/execution/linker.rs
to_lanes
called by 316
src/execution/interpreter_loop.rs
from_lanes
called by 202
src/execution/interpreter_loop.rs

Shape

Function 558
Method 238
Class 87
Enum 29
Interface 9

Languages

Rust100%

Modules by API surface

tests/table_init.rs100 symbols
src/execution/store/mod.rs48 symbols
src/execution/value.rs46 symbols
tests/conversions.rs41 symbols
src/validation/validation_stack.rs33 symbols
src/execution/store/linear_memory.rs30 symbols
src/core/reader/mod.rs28 symbols
tests/f32.rs26 symbols
src/execution/interop.rs26 symbols
tests/arithmetic/bitwise.rs22 symbols
tests/f64.rs21 symbols
tests/memory_copy.rs17 symbols

For agents

$ claude mcp add wasm-interpreter \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact