nim-wasm-test/config.nims

35 lines
996 B
Text
Raw Normal View History

2025-08-19 13:21:43 -07:00
when defined( emscripten ):
2025-08-19 13:21:43 -07:00
--define:GraphicsApiOpenGlEs2
# --define:NaylibWebResources
# switch("define", "NaylibWebResourcesPath=resources")
# switch("define", "NaylibWebPthreadPoolSize=2")
# --define:NaylibWebAsyncify
--os:linux
--cpu:wasm32
--cc:clang
when defined( windows ):
--clang.exe:emcc.bat # Replace C
--clang.linkerexe:emcc.bat # Replace C linker
--clang.cpp.exe:emcc.bat # Replace C++
--clang.cpp.linkerexe:emcc.bat # Replace C++ linker.
else:
--clang.exe:emcc
--clang.linkerexe:emcc
--clang.cpp.exe:emcc
--clang.cpp.linkerexe:emcc
2025-08-19 13:21:43 -07:00
--mm:arc
--threads:on
--panics:on
--exceptions:goto
--define:noSignalHandler
--passL:"-Oz" # Production build
# --passL:"-O0 -gDebug -gsource-map" # Debug build
2025-08-19 13:21:43 -07:00
# --passL:"-s EXPORT_NAME=Test1Module"
# --passL:"-s MODULARIZE=1"
--passL:"-s ASYNCIFY" # async support
# --passL:"-s JSPI" # async support
--passL:"-o build/index.html"
--passL:"--shell-file minshell.html"
2025-08-19 13:21:43 -07:00