zig-wasm-dom icon indicating copy to clipboard operation
zig-wasm-dom copied to clipboard

zig build does not produce wasmtest.wasm

Open rhelsing opened this issue 2 years ago • 2 comments

Screen Shot 2022-04-09 at 3 18 50 PM

This is the output of the zig build command.

I'm using 0.9.1

rhelsing avatar Apr 09 '22 19:04 rhelsing

@rhelsing Small syntax update needed for 0.9.1 See this: https://github.com/shritesh/zig-wasm-dom/pull/5/commits/c36d71c03dc809363bbf36e267b421150353c7df

To compile: zig build-lib -O ReleaseSmall -targe wasm32-wasi -dynamic src/zigdom.zig

You get zigdom.wasm and it works well.

seungjin avatar Sep 20 '22 05:09 seungjin

im using zig-0.11.0-dev (1) - clone this repo

the new build command needs (-rdynamic) flag

(2) run " zig build-lib -O ReleaseSmall -target wasm32-wasi -dynamic -rdynamic zigdom.zig "

(3) serve with any http server that support file change refresh (opening the html file won't do anything) a good way to do that is using this > https://github.com/yandeu/five-server

i heard that zig has http server built in the std library now but i haven't tried it it seems to be blazingly fast so thats cool

sanabel-al-firdaws avatar Jun 20 '23 19:06 sanabel-al-firdaws