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.
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.