snizu function build
Compile a function to WebAssembly with its language's own tools, and refuse a module bigger than the platform takes, while that's still cheap to find out.
Node 22+1 min read
Usage
snizu function build [dir]Flags
[dir]pathThe function's folder, with itssnizu.function.json. The current one by default.
What it runs
Rustcargo build --release --target wasm32-wasip1, then copies the module. Install Rust from rustup.rs, thenrustup target add wasm32-wasip1.JavaScriptjavy build index.js -o dist/function.wasm. Install Javy from its GitHub releases.
Either way the module is dist/function.wasm. The platform takes modules up to 256 KB, and the build fails on a bigger one: build with fewer dependencies.
Examples
$ snizu function build
✓ Built dist/function.wasm (182 KB).$ snizu function build
✗ Javy isn't installed. Get it from github.com/bytecodealliance/javy, then build again.Was this page helpful?
Updated 25 Nov 2026