This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.
Having just read a short post on compiling zig into WASM , I figured I’d attempt the same. Alas, I didn’t find the instructions particularly clear. First, write a function in zig. // main.zig export fn addInc(a : i32 , b : i32 ) i32 { return a + inc(b); } extern fn inc(a : i32 ) i32 ; now, we compile it: zig build-lib main.zig -target wasm32-freestanding -dynamic -OReleaseSafe to…
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.