Commit graph

26 commits

Author SHA1 Message Date
0ab30a1d81 fixes
Some checks failed
CI / build-test-release (push) Failing after 8m31s
2026-04-30 02:20:19 +02:00
bc9ceb8f24 config from args
All checks were successful
CI / build-test-release (push) Successful in 9m2s
2026-04-29 18:59:01 +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
5e1fcd8590 V2 progress 2026-04-23 01:57:25 +02:00
2d89528bdf fixed mingw
Some checks failed
demo.yaml / fixed mingw (push) Failing after 0s
2026-04-02 16:53:07 +02:00
7a64859d24 windows exception handler
Some checks failed
demo.yaml / windows exception handler (push) Failing after 0s
2026-03-09 20:14:44 +01:00
04533b5778 windows build fix
Some checks failed
demo.yaml / windows build fix (push) Failing after 0s
2026-03-02 22:14:56 +01:00
ae2d061282 windows fix
Some checks failed
demo.yaml / windows fix (push) Failing after 0s
2026-03-02 21:11:56 +01:00
3968e0d80c windows fix
Some checks failed
demo.yaml / windows fix (push) Failing after 0s
2026-03-02 21:03:36 +01:00
d98738fe68 BLAZINGLY FAST BUILD
Some checks failed
demo.yaml / BLAZINGLY FAST BUILD (push) Failing after 0s
2026-03-02 17:29:03 +01:00
9bd12660eb libc++
Some checks failed
demo.yaml / libc++ (push) Failing after 0s
2026-03-02 15:24:45 +01:00
43d59e2f57 windows build fixes
Some checks failed
demo.yaml / windows build fixes (push) Failing after 0s
2026-03-01 17:27:45 +01:00
76c08dcbfd windows build fixes
Some checks failed
demo.yaml / windows build fixes (push) Failing after 0s
2026-03-01 16:13:04 +01:00
c4686ae1cc full windows build?
Some checks failed
demo.yaml / full windows build? (push) Failing after 0s
2026-03-01 14:57:47 +01:00
e684882cb8 windows build
Some checks failed
demo.yaml / windows build (push) Failing after 0s
2026-03-01 07:42:04 +01:00
4df34fac91 CUDA support
Some checks failed
demo.yaml / CUDA support (push) Failing after 0s
2026-01-06 19:36:22 +01:00
0819baf6d3 fixed recursive libs
Some checks failed
demo.yaml / fixed recursive libs (push) Failing after 0s
2025-11-16 18:44:41 +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
89302a5534 dep fix 2025-11-09 20:29:30 +01:00
698665215b additional file fix 2025-11-09 20:08:23 +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