Crafter.Build/examples
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf 3e125d83f0
docs: wasm exceptions as the review left them
The README called an exception escaping main a trap. It is an uncaught
WebAssembly exception, and nothing prints its type or what(); the
README says so now. It also lists what a wasm build refuses and why,
says that setjmp needs -lsetjmp and that a longjmp across a noexcept
function ends the program, that a wasmtime older than 47 needs
-W exceptions=y, and that an old wasm-opt on PATH breaks release links.
It documents exit and park in a page from EnableWasiBrowserRuntime,
with the declaration of the park import.

The wasi example still sent Arch users to wasi-libc++, which has no
exception-enabled libraries. It asks for a wasi-sdk 33 sysroot or the
Flatpak now, and names the browsers a page needs. AGENTS.md notes that
the runtime test needs node, so it runs in the native loop and not in
CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 06:10:41 +01:00
..
hello-world feat(toolchain): resolve the compiler in one place 2026-10-02 22:26:31 +02:00
library feat(toolchain): resolve the compiler in one place 2026-10-02 22:26:31 +02:00
tests feat(toolchain): resolve the compiler in one place 2026-10-02 22:26:31 +02:00
wasi docs: wasm exceptions as the review left them 2026-10-31 06:10:41 +01:00
with-module feat(toolchain): resolve the compiler in one place 2026-10-02 22:26:31 +02:00
LICENSE SPDX license update 2026-07-22 18:19:17 +02:00
README.md V2: WASI, -r flag, CI pipeline, examples & tests cleanup 2026-04-28 23:24:46 +02:00

Examples

Self-contained projects, ordered from simplest to most full-featured. Each example has its own README explaining what it shows.

Example What it shows
hello-world The minimum: project.cpp + main.cpp
with-module Adding a C++ module interface
library Library + executable, linked via cfg.dependencies
tests Auto-discovered tests + tests that link the parent library

Each example builds standalone: cd examples/<name> && crafter-build. Test examples: crafter-build test.