projects/Zig/README.md
To compile the project:
zig build
To run the project:
zig build run
To change from debug to release build you can do it with the -Doptimze= flag.
Debug
ReleaseSafe
ReleaseFast
ReleaseSmall
To compile with a different platform you can use the -Dplatform= flag.
Here all the options:
glfw
rgfw
sdl
sdl2
sdl3
memory
win32
drm
android
In this example the platform sdl and sdl2 are not supported
Important for the android platform you also have to compile for the right target
To compile for a different target you can use the -Dtarget= flag.
Not all targets are supported
To compile for the web we use emscripten and you run it like that:
zig build -Dtarget=wasm32-emscripten
To run it we do:
zig build run -Dtarget=wasm32-emscripten
And to make a relase build we do:
zig build -Dtarget=wasm32-emscripten -Doptimize=ReleaseFast
If we want to use rgfw for the web build we could do:
zig build -Dplatform=rgfw -Dtarget=wasm32-emscripten -Doptimize=ReleaseFast
-Dzig and try out zig ;)See Zig Build System