Commit graph

47 commits

Author SHA1 Message Date
eaee502e8c V2: WASI, -r flag, CI pipeline, examples & tests cleanup
Some checks failed
CI / build-test-release (pull_request) Failing after 44s
WASI / wasm32 target support
- Auto-detect /usr/share/wasi-sysroot on Linux when target starts_with("wasm32")
- Skip -march/-mtune for wasm (clang rejects them)
- Apply -fno-exceptions -fno-c++-static-destructors -mllvm -wasm-enable-sjlj
  -D_WASI_EMULATED_SIGNAL to wasm builds (compile + std PCM, kept in sync)
- .wasm output extension in expectedOutputFor and link command
- EnableWasiBrowserRuntime(cfg): opt-in helper that drops index.html +
  runtime.js next to the .wasm; runtime.js reads window.CRAFTER_WASM_URL
  set in the templated index.html so a single shim handles any output name

-r run flag in the CLI: build then exec the artifact (host targets only;
  rejects libraries; auto .exe/.wasm extension handling)

CI pipeline (.forgejo/workflows/ci.yaml)
- Triggers: PR/push to master + manual dispatch
- Single arch-latest container job: install deps, bootstrap, self-rebuild,
  run tests, cross-compile mingw, package both archives, upload artifacts
- Rolling 'latest' release published only on push/dispatch to master

mingw cross-compile from Linux now works end-to-end:
- ExternalDependency cache key includes target so per-target glslang builds
  don't collide; CMAKE_BUILD_TYPE=Release pinned (otherwise glslang appends
  'd' to lib names and breaks linking); cross-compile cmake flags
  (CMAKE_SYSTEM_NAME=Windows, CMAKE_*_COMPILER_TARGET=...)
- project.cpp accepts --target=<triple>; Linux-only -Wl,--export-dynamic
  and -ldl are gated; mingw glslang skips the standalone exe (its libgcc_eh
  link pulls pthread which mingw doesn't link by default)
- mingw compile uses -femulated-tls so std::__once_callable etc reference
  the same emutls symbols libstdc++ provides
- mingw link auto-adds -lstdc++exp -lpthread

GetCrafterBuildHome() exposed from the Platform module; LoadProject (Linux
+ Windows) now both use it instead of duplicating the resolution.

Examples reorg: hello-world, library, with-module, wasi, tests — each with
its own README. Tests reorg: per-test directory with inner/ fixture, no
shared tests/fixtures/ tree. New Wasi test verifies .wasm magic bytes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 23:24:46 +02:00
5e1fcd8590 V2 progress 2026-04-23 01:57:25 +02:00
c2bb9023d4 threaded exception handling
Some checks failed
demo.yaml / threaded exception handling (push) Failing after 0s
2025-11-15 19:20:33 +01:00
598c666e91 test
Some checks failed
/ test (push) Failing after 1s
2025-11-14 21:48:36 +01:00
abd58eb57b test
Some checks failed
/ test (push) Has been cancelled
2025-11-14 21:47:49 +01:00
e8a608dde6 test
Some checks failed
/ test (push) Failing after 1s
2025-11-14 21:06:55 +01:00
a51cc01047 test
Some checks failed
/ test (push) Failing after 5s
2025-11-14 20:44:00 +01:00
69ffeed5f4 test
Some checks failed
/ test (push) Failing after 3s
2025-11-14 20:43:12 +01:00
957c0f54e0 test
Some checks failed
/ test (push) Failing after 4s
2025-11-14 20:42:37 +01:00
ea317ccf1b test
Some checks failed
/ test (push) Failing after 25s
2025-11-14 20:41:59 +01:00
30572c1696 test
Some checks failed
/ test (push) Failing after 4s
2025-11-14 20:39:16 +01:00
c01c89cc8e test
All checks were successful
/ test (push) Successful in 4s
2025-11-14 20:36:57 +01:00
a457f7d9ad test
Some checks failed
/ test (push) Failing after 3s
2025-11-14 20:35:17 +01:00
4274e09fda test
Some checks failed
/ test (push) Failing after 4s
2025-11-14 20:35:11 +01:00
3115ddda46 test
Some checks failed
/ test (push) Failing after 4s
2025-11-14 20:34:10 +01:00
865ec91ea7 test
Some checks failed
demo.yaml / test (push) Failing after 0s
2025-11-14 20:33:53 +01:00
e948ea9ee3 test
Some checks failed
demo.yaml / test (push) Failing after 0s
2025-11-14 20:33:16 +01:00
379968a521 test
Some checks failed
/ test (push) Failing after 6s
2025-11-14 20:29:43 +01:00
d766bb36a4 test
Some checks failed
/ test (push) Failing after 4s
2025-11-14 20:29:25 +01:00
2c748bca00 test
Some checks failed
/ test (push) Failing after 10s
2025-11-14 20:27:05 +01:00
dfaca0e871 test
Some checks failed
/ test (push) Failing after 8s
2025-11-14 20:26:20 +01:00
53198ea42d test
All checks were successful
/ test (push) Successful in 4s
2025-11-14 20:24:45 +01:00
2917fd7549 test
All checks were successful
/ test (push) Successful in 4s
2025-11-14 20:23:48 +01:00
f691e01556 test
Some checks failed
/ test (push) Failing after 4s
2025-11-14 20:23:01 +01:00
670937516d test
Some checks failed
/ test (push) Failing after 3s
2025-11-14 20:22:25 +01:00
4346917a98 test
Some checks failed
/ test (push) Failing after 4s
2025-11-14 20:20:39 +01:00
f84a112736 test
Some checks failed
/ test (push) Failing after 4s
2025-11-14 20:19:04 +01:00
446ca66397 test
Some checks failed
/ test (push) Failing after 4s
2025-11-14 20:16:48 +01:00
aab21639a4 test
All checks were successful
/ test (push) Successful in 4s
2025-11-14 20:16:13 +01:00
b761616998 test
Some checks failed
/ test (push) Failing after 4s
2025-11-14 20:15:45 +01:00
da3f51faaf test
Some checks failed
/ test (push) Failing after 4s
2025-11-14 20:15:24 +01:00
8933ba33b0 test
Some checks failed
/ test (push) Failing after 5s
2025-11-14 20:14:12 +01:00
397a07d52f test
Some checks failed
/ test (push) Failing after 3s
2025-11-14 20:13:01 +01:00
5ce645d8f0 test
All checks were successful
/ test (push) Successful in 4s
2025-11-14 20:12:28 +01:00
1f55cdafea test
All checks were successful
/ test (push) Successful in 4s
2025-11-14 20:11:46 +01:00
caed1d118e test
Some checks failed
/ test (push) Failing after 10s
2025-11-14 20:10:18 +01:00
512d56c7a9 test
Some checks failed
/ test (push) Failing after 4s
2025-11-14 20:08:54 +01:00
eca7015de7 test
Some checks failed
/ test (push) Failing after 3s
2025-11-14 20:08:32 +01:00
14c38ccdbf test
Some checks failed
/ test (push) Failing after 4s
2025-11-14 20:07:25 +01:00
f8e5c6afb1 test
Some checks failed
/ test (push) Has been cancelled
2025-11-14 20:06:54 +01:00
0f4e5e33be test
Some checks failed
/ test (push) Failing after 6s
2025-11-14 20:05:58 +01:00
42fd61923d test
Some checks failed
/ test (push) Failing after 6s
2025-11-14 20:05:00 +01:00
6cd1c47838 test
Some checks failed
/ test (push) Has been cancelled
2025-11-14 20:02:32 +01:00
d52daf4a36 test
Some checks failed
/ test (push) Failing after 6s
2025-11-14 20:01:59 +01:00
0d3c2ff41b test
Some checks failed
/ test (push) Failing after 7s
2025-11-14 20:01:41 +01:00
292d221fec actions test 2
Some checks failed
/ test (push) Failing after 14s
2025-11-14 19:58:47 +01:00
31926e09fa actions test
All checks were successful
/ test (push) Successful in 18s
2025-11-14 19:57:02 +01:00