pepl-codegen
PEPL WASM code generator: compiles a verified AST into a .wasm binary.
Takes a type-checked and invariant-checked PEPL AST and emits a valid WebAssembly module using wasm-encoder. Includes gas metering, source maps, and the PEPL runtime ABI.
Key Exports
use ;
let wasm_bytes: = compile;
let = compile_with_source_map?;
Features
- WASM output — generates valid
.wasmbinaries viawasm-encoder - Gas metering — injects gas accounting into generated code
- Source maps — maps WASM instructions back to PEPL source locations
- Runtime ABI — defines the host import/export contract for PEPL modules
Install
License
MIT — see LICENSE