add doc for building for web

main
Fabien Freling 2023-10-06 14:33:42 +02:00
parent efd8a47287
commit 9d18f283d1
3 changed files with 16 additions and 0 deletions

View File

@ -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

11
zig/README.md Normal file
View File

@ -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

View File

@ -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