Hey, nice. Lots to learn still, but this is working.

This commit is contained in:
Mahlon E. Smith 2025-08-19 13:26:36 -07:00
parent eb25270d34
commit 740211ed4c
Signed by: mahlon
SSH key fingerprint: SHA256:dP84sRGKZRpOOiPD/+GuOq+SHSxEw9qi5BWLQobaHm0
3 changed files with 53 additions and 32 deletions

View file

@ -1,10 +1,10 @@
# Package
version = "0.1.0"
author = "Mahlon E. Smith"
description = "Dinking around with raylib and wasm target"
license = "MIT"
srcDir = "src"
version = "0.1.0"
author = "Mahlon E. Smith"
description = "Dinking around with raylib and wasm target"
license = "MIT"
srcDir = "src"
requires "nim >= 2.2.4"
requires "naylib >= 25.33.0"
@ -14,9 +14,9 @@ task make, "Native build":
exec "mkdir -p build && nim c --outdir:build -d:release --opt:speed src/nim_wasm_test.nim"
task makeweb, "Emscripten build":
exec "mkdir -p build && nim c --outdir:build -d:emscripten src/nim_wasm_test.nim"
exec "mkdir -p build && nim c -d:emscripten -d:release src/nim_wasm_test.nim"
task runweb, "Run a local webserver for the wasm build":
exec "nimhttpd -H:'Cross-Origin-Opener-Policy: same-origin' -H:'Cross-Origin-Embedder-Policy: require-corp'"
exec "nimhttpd -H:'Cross-Origin-Opener-Policy: same-origin' -H:'Cross-Origin-Embedder-Policy: require-corp' build/"