tpt-wasm

Rust

Independent Rust implementation of WebAssembly — specification-first, with a minimal executable semantic core (Micro Interpreter), capability-oriented host, Lean 4 formal verification layer, and native compiler. Not a Wasmtime fork.

0 stars0 forks0 watchers

Languages

Rust100.0%
README

tpt-wasm

TPT-Wasm is an independent Rust implementation of WebAssembly built around a minimal executable semantic core, capability-oriented host, formal verification layer, and native compiler.

This is not a Wasmtime alternative. It is not a Wasmtime fork.
It is a specification-first WebAssembly execution system.

Architecture

                       WEBASSEMBLY CORE STANDARD
                                  │
                    ┌─────────────▼─────────────┐
                    │      TPT-WASM SEMANTICS    │
                    │  types · validation ·      │
                    │  instantiation · execution │
                    └──────────────┬─────────────┘
                                   │
             ┌─────────────────────┼──────────────────┐
             │                     │                  │
             ▼                     ▼                  ▼
      ┌────────────┐      ┌──────────────┐   ┌──────────────┐
      │   MICRO    │      │    FORMAL    │   │      IR      │
      │INTERPRETER │      │    MODEL     │   │   COMPILER   │
      └────────────┘      └──────────────┘   └──────────────┘
             │                     │                  │
             └─────────────────────┼──────────────────┘
                                   │
                        ┌──────────▼──────────┐
                        │    TPT-WASM HOST    │
                        │  capabilities ·     │
                        │  resources ·        │
                        │  determinism · WASI │
                        └──────────┬──────────┘
                                   │
                             tpt-system
                                   │
                      physics · FEM · robotics · ...

The four layers

LayerCrateQuestion
Micro Interpretertpt-wasm-microWhat does WebAssembly mean?
TPT Hosttpt-wasm-hostWhat may a Wasm program interact with?
Formal Verificationtpt-wasm-semantics, tpt-wasm-verifyCan we prove correct behavior?
Full Compilertpt-wasm-ir, tpt-wasm-codegen, tpt-wasm-jit, tpt-wasm-aotCan we execute the same semantics efficiently?

The central invariant

There is one meaning of a WebAssembly program, expressed formally and embodied by the Micro Interpreter. Every optimized implementation must preserve that meaning.

Status

Architecture / greenfield implementation. Targeting WebAssembly Core 3.0.

See todo.md for the full milestone tracker (M0–M10).

Workspace crates

CratePurpose
tpt-wasm-typesSemantic value and type definitions
tpt-wasm-formatModule structure representation
tpt-wasm-decodeBinary format decoder
tpt-wasm-validateValidation pass → ValidatedModule
tpt-wasm-microMicro Interpreter (Golden Machine, zero unsafe)
tpt-wasm-runtimeStore, Instance, Linker, Engine
tpt-wasm-hostTPT capability host
tpt-wasm-capabilityCapability types and trait
tpt-wasm-resourceResource table and opaque handles
tpt-wasm-semanticsFormal abstract machine
tpt-wasm-verifyVerification infrastructure
tpt-wasm-irTPT intermediate representation
tpt-wasm-codegenBaseline code generation
tpt-wasm-jitJIT compiler
tpt-wasm-aotAOT compiler
tpt-wasmPublic embedding API
tpt-wasm-cliCommand-line interface

License

Licensed under either of

at your option.

Copyright (c) 2026 TPT Solutions

Standards

Contributing

See CONTRIBUTING.md.
Project discussion and issue tracking: GitHub Issues.