3 ms·
Doesn't Zig compile to WASM too?
by Defletter 2y ago
Doesn't Zig compile to WASM too?
- flohofwoe 2y agoYes, for instance this is mixed Zig/C project (the C part are the sokol headers for the platform-glue code): https://floooh.github.io/pacman.zig/pacman.html https://floooh.github.io/pacman.zig/pacman.html The Git repo is here: https://github.com/floooh/pacman.zig https://github.com/floooh/pacman.zig ...in this specific project, the Emscripten SDK is used for the link step (while compilation to WASM is handled by the Zig compiler, both for the Zig and C sources). The Emscripten linker enables the 'embedded Javascript' EM_JS magic used by the C headers, and it also does additional WASM optimizations via Binaryen, and creating the .html and .js shim file needed for running WASM in browsers. It's also possible to create WASM apps running in browsers using only the Zig toolchain, but this requires solving those same problems in a different way.
- nine_k 2y agoYes, but the point of the joke was to make the loop longer, while keeping it somehow logical. I wish I managed to insert Purescript, Elixir, Pony and ATS somehow.