Molt
A compiler for turning a supported subset of Python into standalone native binaries and WebAssembly.
Python → Molt → WebAssembly
A small program, running in your browser
I compiled these Python programs with a pinned version of Molt. Choose a fractal, a school-data calculation, or a word counter. The button runs the resulting WebAssembly in a browser worker and displays its standard output.
Ready to run
This example was compiled ahead of time. Editing and compiling arbitrary Python on this website is not supported.
I’m building Molt to ship Python applications without requiring a Python installation on the machine that runs them. The compiler targets CPython 3.12+ behavior for the subset of the language it supports.
Molt analyzes the whole program, infers types, and removes unused code before generating a binary. The backend is written in Rust. Native compilation and WebAssembly have separate output paths, and differential tests compare supported behavior with CPython.
The project is still in development. Compatibility varies by application and target; WebAssembly parity is incomplete. Unrestricted runtime code execution and monkeypatching are outside the compiled-language design. The current status and getting-started guide cover what works and how to try it.
The example on this page runs a Python Mandelbrot program that I compiled with Molt. It executes WebAssembly in your browser and shows the program’s standard output. The Python source, compiled binary, and build record are available alongside it.