Skip to content

Building

codingncaffeine edited this page Sep 12, 2026 · 3 revisions

Building

Requirements

  • CMake 3.24 or newer
  • Ninja
  • A C++23 compiler: gcc 13 or newer, or clang 16 or newer

Nothing else. There are no third-party libraries to fetch — see The Pledge.

Build and test

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build
ctest --test-dir build --output-on-failure

Every file compiles with warnings as errors (-Wall -Wextra -Wpedantic -Werror -Wshadow -Wold-style-cast and more).

Both compilers, and the checks

bash tools/buildall.sh

builds and tests the gcc lane (build-gcc) and the clang lane (build-clang), then runs the two checks that gate a push:

Check What it proves
tools/pledge-check.sh The binary imports only the OS libraries on the per-OS allowlist
tools/egress-check.sh Network primitives stay behind the one fetch() choke point

What CI runs on every push

  • Linux with gcc, Linux with clang, and a Linux lane under AddressSanitizer and UndefinedBehaviorSanitizer
  • Windows (MinGW gcc) and macOS
  • The fuzz targets, as a smoke run over their corpora
  • The Web Platform Tests' CSS reference tests, scored against the committed baseline (a listed test that stops passing fails the build)
  • A second workflow renders The Sashfold 100 on a Windows runner and deploys the site

Reference-test goldens are compared byte for byte on all three OSes; a render that differs by one pixel on one compiler is a failure. See Testing.

Platform notes

  • Windows. The window and TLS (SChannel) are written. The release binary is a static MinGW build that imports six OS libraries and nothing else.
  • Linux. The window (a Wayland client of its own, over the compositor's socket) and TLS (a TLS 1.3 and 1.2 client of its own: ChaCha20-Poly1305 and AES-128-GCM over x25519 and P-256, certificates validated against the system CA bundle and their revocation lists; the badssl matrix is refused) are written. The binary imports libc, libm, libstdc++ and libgcc_s and nothing else. bash tools/install-desktop-linux.sh puts it in the applications menu.
  • macOS. The engine, the tests and the headless modes (--render, --bench, --script, --dump-dom) build and run; the window and TLS are not written yet. See Not written yet.

Tools the repository generates its own data with

Tool Makes
tools/gen-unicode.cpp The Unicode tables the URL parser and text code use (UTS #46, NFC, and the rest)
tools/gen-entities.ps1 with tools/entities.json The HTML character-reference table
tools/gen-font.cpp (the gen_font target) Sashfold Mono as a TrueType file, tests/fixtures/fonts/SashfoldMono.ttf
tools/wpt-fetch.sh A shallow, sparse checkout of the Web Platform Tests at the pinned revision
tools/sashfold100.sh and tools/sashfold100.cpp The Sashfold 100 renders and their dashboard

Clone this wiki locally