Commit graph

26 commits

Author SHA1 Message Date
03717b5f33 asset compression
Some checks failed
CI / build-test-release (push) Failing after 15m11s
2026-05-12 01:16:40 +02:00
4d09eaac2a loading bar
Some checks failed
CI / build-test-release (push) Failing after 4m41s
2026-04-29 03:27:11 +02:00
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
cdfdb976c8 test runner, cross-target runners, lib/exe split
- subprocess-isolated test runner (replaces V1 dlopen-RunTest);
  Pass/Fail/Crash/Timeout/Skipped outcomes via :Test partition
- TestRunner abstraction with command templates: Local, Ssh,
  SshWin (cmd.exe-shell), QemuUser, FromEnv; probe-based skip
  when runner unreachable
- transitive PCM-path propagation in Build(); resolveImport
  walks deps recursively; depResults cache keyed by PcmDir()
  so per-target builds don't collide
- cfg.sysroot threaded through BuildStdPcm + base compile/link
  command (enables aarch64 cross via Arch Linux ARM rootfs)
- lib + exe split: project.cpp defines crafterBuildLib
  (LibraryStatic) + crafterBuildExe (Executable depending on
  it); build.sh produces lib/libcrafter-build.a alongside
  bin/crafter-build for downstream static-link consumers
- Windows DLL+launcher: CRAFTER_API macro, /EXPORT flag for
  project.dll's CrafterBuildProject; Crafter::Run as the real
  entry point with main.cpp as a thin wrapper
- 18 tests: HelloWorld/WithModule/Defines/CrossProjectModule/
  Diamond × (Linux + sshwin:winvm), plus Incremental,
  BuildError, Libraries, RunnerClassification, QemuUser,
  SshRunner, WindowsViaSsh, CrossArchAarch64
- single ./bin/crafter-build test runs everything; Windows
  variants skip gracefully if winvm SSH alias unreachable

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 22:32:19 +02:00
f13671b2be v2 nearly done 2026-04-27 07:04:42 +02:00
ae2d061282 windows fix
Some checks failed
demo.yaml / windows fix (push) Failing after 0s
2026-03-02 21:11:56 +01:00
8531c6a6b9 windows fix
Some checks failed
demo.yaml / windows fix (push) Failing after 0s
2026-03-02 21:05:18 +01:00
9bd12660eb libc++
Some checks failed
demo.yaml / libc++ (push) Failing after 0s
2026-03-02 15:24:45 +01:00
e684882cb8 windows build
Some checks failed
demo.yaml / windows build (push) Failing after 0s
2026-03-01 07:42:04 +01:00
aa65d9ea46 windows build
Some checks failed
demo.yaml / windows build (push) Failing after 0s
2026-02-23 02:16:50 +01: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
ef0d25cf4a wasi lifecycle fix 2025-11-14 18:40:43 +01:00
f90881b03d wasm 2025-11-09 18:56:24 +01:00
c63f3430a5 test fixes 2025-11-01 06:50:41 +01:00
0eed272765 rewrite 2025-10-31 16:50:47 +01:00
23fa8b98b0 error messages 2025-09-09 23:04:05 +02:00
52436399e8 conditional compiling and multithreading
Some checks failed
Main / build (push) Has been cancelled
2025-05-03 01:20:31 +02:00
cf08a52f42 build.sh fix 2025-04-29 00:15:14 +02:00
d13bf354ab comment shader 2025-04-24 19:25:13 +02:00
be18fb8568 update 2025-04-24 19:21:09 +02:00
dc3865ba6d march, flags, and git dependencies 2025-02-03 22:06:54 +01:00
c0a54c8282 multithreaded module compilation 2024-12-31 20:32:00 +01:00
905df28711 improved paths 2024-12-29 17:53:46 +01:00
1872046694 added optimizations 2024-12-28 22:35:54 +01:00
e108f0859b added CLI 2024-12-28 21:26:19 +01:00
0cf068b896 initial commit 2024-12-28 21:00:12 +01:00