diff --git a/flake.nix b/flake.nix index e70959f..1ef958e 100644 --- a/flake.nix +++ b/flake.nix @@ -58,6 +58,7 @@ # Zig / webAssembly impl. zig zls + emscripten ]; # see: https://discourse.nixos.org/t/flutter-run-d-linux-build-process-failed/16552/2 diff --git a/zig/README.md b/zig/README.md new file mode 100644 index 0000000..9984d33 --- /dev/null +++ b/zig/README.md @@ -0,0 +1,11 @@ +# FabApp + +## Build for web + +- https://github.com/ryupold/examples-raylib.zig + * https://github.com/ryupold/examples-raylib.zig/blob/main/build.zig +- https://github.com/ziglang/zig/issues/10836#issuecomment-1666488896 +- https://github.com/ziglang/zig/pull/17210 + * https://github.com/mitchellh/zig-overlay +- https://github.com/bluesillybeard/ZigAndRaylibSetup +- https://github.com/nrdmn/awesome-zig#web diff --git a/zig/justfile b/zig/justfile index 39a66e6..2571d45 100644 --- a/zig/justfile +++ b/zig/justfile @@ -6,6 +6,10 @@ alias fmt := format build: zig build +web-build: + # zig build-lib src/main.zig -target wasm32-freestanding -dynamic -rdynamic + zig build -Dtarget=wasm32-emscripten --sysroot /nix/store/zll7a6ns3avx509kgx0jjghz8g89l2g0-emscripten-3.1.45 + run: nixGL zig build run