This commit is contained in:
agra
2026-03-03 13:25:25 +02:00
parent 6ffe22acb0
commit 343ea4bf08
9 changed files with 736 additions and 169 deletions

22
build.sx Normal file
View File

@@ -0,0 +1,22 @@
#import "modules/compiler.sx";
configure_build :: () {
opts := build_options();
inline if OS == {
case .wasm: {
output := if POINTER_SIZE == 4
then "sx-out/wasm32/index.html"
else "sx-out/wasm64/index.html";
opts.set_output_path(output);
opts.set_wasm_shell("shell.html");
opts.add_link_flag("-sUSE_SDL=3");
opts.add_link_flag("-sMAX_WEBGL_VERSION=2");
opts.add_link_flag("-sFULL_ES3=1");
opts.add_link_flag("--preload-file assets");
opts.add_link_flag("-sALLOW_MEMORY_GROWTH=1");
}
case .macos: {
opts.set_output_path("main");
}
}
}