Skip to content

InvalidPathException/wagmi

Repository files navigation

WAGMI (WebAssembly General & Minimal Interpreter)

WAGMI is a minimalistic in-place WebAssembly interpreter written in Rust, with full support for the WebAssembly 1.0 core standard.

Based on the original paper by Ben L. Titzer.

Project Structure

  • /src - Core interpreter implementation
    • module.rs - WebAssembly module parsing and structure
    • validator.rs - Module validation logic
    • instance.rs - Runtime instance and execution engine
    • wasm_memory.rs - Linear memory management
    • signature.rs - Function signature handling
    • leb128.rs - LEB128 encoding/decoding utilities
    • byte_iter.rs - Byte stream iteration helpers
    • error.rs - Error types and handling
    • lib.rs - Library entry point
    • /bin - Example usage demonstrations
  • /tests - Tests
    • /spec_tests.rs - Test runner
    • /core - WebAssembly spec test suite
  • /tools - WebAssembly text format to bytecode translation tools
  • /docs - More detailed documentation

Testing

The spec test suite is from the WebAssembly specification repository. The wast2json and wat2wasm binaries used are version 1.0.13 (1.0.14) Windows version available here.

Note: This project specifically targets the WebAssembly 1.0 core standard. Newer test converters may not be compatible. Support beyond 1.0 will only be considered after some performance-improving overhauls.

About

An in-place Wasm interpreter written in Rust

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published