Tool Open source

Lasm

Lasm is a compiler and CLI that compiles Lean 4 programs ahead of time to WebAssembly for JavaScript and WebAssembly runtimes. It supports Node.js, Bun, Deno, browsers, serverless and edge platforms, WASI, Spin, and Fastly, with targets that produce deployment-specific output such as Node launchers, browser sites, function packages, or WASI modules.

View repository Mentioned in 1 video ↓

Overview

Applications can use Lasm libraries for HTTP handling, browser interfaces, typed client-server APIs, web APIs, key-value storage, and JavaScript/npm interoperability. Lean proofs, tactics, macros, elaboration, and evaluation run during compilation; deployed programs cannot elaborate or compile new Lean code or load Lean compiler data at runtime. The project includes templates for command-line programs, REST APIs, serverless functions, edge functions, browser applications, and full-stack applications, and is distributed under the MIT license through the @lasm/cli npm package.

What Lasm is used for

1 use taken from transcripts — each links to the moment in the video.

  • Compiles Lean programs ahead of time into WebAssembly, bringing the mathematical proof language to the JavaScript world. The same output can run as a Node server, serverless function, or browser app.

Videos mentioning Lasm

1 in the library.