Developer utility
Wasmize Lite is a browser workbench for testing the shape of a small Vite or Astro WebAssembly transform. Add `/** @wasm */` before a function, and the tool checks whether its single numeric return expression fits the supported subset. Eligible functions become a minimal WebAssembly module with an asynchronous JavaScript wrapper. This is a prototype for a narrow arithmetic grammar. It is not a general JavaScript-to-WebAssembly compiler or a production-ready plugin generator.
What it does
Start with an eligible, rejected, unmarked, or mixed example, or enter your own JavaScript or TypeScript-style function in the editor.
Place `/** @wasm */` immediately before a named function whose body is one numeric return expression.
Select a separate `.wasm` asset wrapper or an inline base64 wrapper, then press Compile.
Check which functions passed or failed, then read the diagnostics, generated wrapper, exported names, and module byte size.
Copy the wrapper, download the generated WebAssembly module, or set a package name and download the prototype scaffold ZIP.
The analyser finds marked, named functions and checks their parameters before parsing a small expression grammar into an internal syntax tree. It emits eligible expressions directly as WebAssembly `f64` instructions, then packages them in a minimal binary with type, function, export, and code sections. The JavaScript wrapper instantiates that binary once and exposes asynchronous functions. When a candidate falls outside the supported grammar, the report explains why instead of pretending the generated WebAssembly would be equivalent.
No. It only compiles a narrow arithmetic subset: named marked functions with numeric parameters and one return expression using numbers, parameters, parentheses, unary minus, and the four basic arithmetic operators.
No. The ZIP is a prototype for inspecting the transform and wrapper structure. Its documentation calls out unfinished asset emission and inline replacement, and the package still needs tests and integration work before production use.
Yes, eligible expressions are encoded into a valid minimal WebAssembly binary that you can download. The workbench does not run the function or claim semantic coverage beyond its documented numeric subset.
The workbench performs analysis and binary generation locally and does not submit editor contents to an application backend or save them in browser storage.