Back to browse
GitHub Repository

Wasm interpreter in lean, designed for reasoning

123 starsLean

Talos – Open-source WASM interpreter for Lean

by mfornet·Jun 18, 2026·105 points·28 comments

AI Analysis

●●●BangerWizardryBig BrainBold Bet

Same Lean definitions execute programs and prove correctness—no separate spec interpreter.

Strengths
  • Weakest-precondition calculus enables compositional proofs for loops and branches
  • Any language compiling to Wasm is verifiable—Rust, C, Zig, Swift all in scope
  • 111 commits with actual factorial proofs showing the WP tactic layer works
Weaknesses
  • Optimized for reasoning clarity, not execution speed—won't replace production Wasm runtimes
  • Lean 4 expertise required limits adoption to formal methods specialists
Target Audience

Formal methods researchers and security-critical software teams

Similar To

K Framework · SAW · F*

Post Description

At Cajal (YC W26) we’re excited to share Talos (https://github.com/cajal-technologies/talos), an open source framework for formal verification of WebAssembly modules in Lean.

AI is now writing tons of the code that gets pushed to production. As code generation gets cheaper, verification becomes the bottleneck. We believe in a future where every piece of software comes with a mathematical proof that it does what its author intended - in doing so, eliminating many classes of exploits. Talos is part of the foundation for that.

Talos provides a Wasm interpreter optimized for reasoning at the binary level, together with a weakest-precondition calculus layer for proving properties about programs. Because we reason directly about WebAssembly, any language with a Wasm backend is in scope: Rust, C++, Go, C, Swift, Kotlin, Zig, C#, and many more.

To make this possible, we use Lean: a programming language and theorem prover that lets you both write software and mathematically prove that it's correct - all in one system. That's what lets Talos double as both an executable interpreter and the formal object Lean reasons about. Lean also integrates with modern AI proving tools, discharging goals automatically via both proof search and direct evaluation.

To see Talos in action check out a proof for Stein's GCD algorithm, implemented in the popular Rust crate num-integer: https://github.com/cajal-technologies/talos/blob/main/progra....

Our roadmap:

- Full Wasm coverage by first passing the official W3C testsuite, then later verifying against SpecTec (formal Wasm spec) - Arbitrary crate verification - any Rust crate that compiles to Wasm should be in scope - Building our proof library codelib, to make verifying increasingly complex programs tractable

We would love to hear the community’s feedback on Talos and comments on the state of formal verification right now. Contributions are also welcome!

Similar Projects