Waspy translates Python functions into WebAssembly binaries. The compiler supports arithmetic operations, control flow (if/else, while loops), multiple functions, and an expanded type system including integers, floats, booleans, and strings with full string operations support.
Compilation Pipeline
[Python Source Code] → Parse & Analyze → [IR] → Generate & Optimize → [WebAssembly Binary]Key Features
- Compiles Python functions to WebAssembly modules
- Supports multiple functions in a single module and across multiple files
- Handles control flow with if/else and while loops
- Full type annotation support for function parameters and return values
- Complete string operations: slicing, concatenation, 20+ methods, and formatting
cargo install waspy