Skip to content

Latest commit

 

History

History
2229 lines (2011 loc) · 148 KB

AGENTS.md

File metadata and controls

2229 lines (2011 loc) · 148 KB

Working on webcpp

This file is how to work in webcpp's tree, for coding agents and human contributors alike: what webcpp is and where everything is, the prerequisites and the commands, the API reference and the pages, the tests, the lanes, the report, the site and the CI, the changelogs and the releases, and the facts of b2. The rules every change keeps, how code is written and every decision of webcpp's design with its reason, are in CODING-GUIDELINES.md, the single source of them. Read it first, then this file, then the library's own AGENTS.md (libs/<name>/AGENTS.md), which holds only what is specific to that library: the original and its version, how its oracle drives the original, its particular cautions. With the two files, an agent with no other context ports a library or changes one.

Agent skills, short playbooks that point into the two files for recurring tasks, are in .agents/skills/<name>/SKILL.md: the library's conventions, a port, the build and its lanes, the documentation and the site, and text and commits. They never replace a rule; where one disagrees, the file it points to wins.

This file describes the tree as it is. What is still to come is in the roadmap, CODING-GUIDELINES.md chapter 16, to which every other mention of it refers. Every command below runs from the superproject's root, in a shell where CPATH, CPLUS_INCLUDE_PATH and C_INCLUDE_PATH are unset (chapter 6). A chapter of this file is cited as "chapter N", one of the guidelines as "CODING-GUIDELINES.md chapter N".

Contents

  1. What webcpp is
  2. The API reference
  3. Documentation
  4. Tests, lanes, the report, the site and CI
  5. Changelogs and releases
  6. b2 facts

1. What webcpp is

webcpp brings to C++ the libraries that are widely used for the web in other languages. Each library is ported with the help of coding agents and proven against the original. webcpp follows Boost's guidelines and model: the GitHub organisation webcpporg is the equivalent of boostorg, and this superproject, webcpporg/webcpp, is the equivalent of boostorg/boost. Every library is header-only C++20, under the Boost Software License 1.0, in a repository of its own, checked out here as a submodule under libs/<name>.

Why webcpp

webcpp builds infrastructure for every developer, in both directions. It brings the best of C++ within easy reach of the web: the libraries of highest quality, compiled to WebAssembly. And it brings to C++ the libraries web developers use most (a JavaScript interpreter, trystero, libp2p, HTTP fetch), so that programs written in C++ and compiled to WebAssembly have them. It speaks to C++ developers, crypto developers and AI developers who want to build decentralized applications for the web. AI agents are first-class readers: they use what webcpp publishes to find libraries of high quality, and webcpp will release integrations with the AIs, to bring the best technology in the world within reach of C++ programs.

Each target has its purpose:

Target For
emscripten the browser: a C++ program as a web page, with everything the browser offers
wasip2, wasip3 WASI components run by wasmtime and by clouds: containers lighter than Docker, distributed computing at scale
native a program that wants close integration with its operating system

The documentation is written for C++ developers, and will also be written for web developers and for AI developers (CODING-GUIDELINES.md chapter 16).

The libraries

Library What it is Targets State
asio Boost.Asio with browser event-loop suspension, WASIp2/P3 networking and optional source-built TLS native, emscripten, wasip2, wasip3 a submodule at libs/asio; see its feature matrix for variants
beast HTTP and WebSocket applications using native/WASIp3 sockets, browser WebSocket/fetch, WASI host HTTP or supplied streams native, emscripten, wasip2, wasip3, by backend a submodule at libs/beast; all 53 upstream applications remain in its compatibility matrix
cobalt Boost.Cobalt coroutine applications with shipped Wasm adaptations and optional corrected SSL native, emscripten, wasip2, wasip3, by capability a submodule at libs/cobalt; see its feature and application matrices for variants
codecs one contract for converting bytes and values to text and back, and any data through streams; eight formats (hex, base32, z-base-32, base58, base64, bech32, percent, RFC 7468's armor); header-only, percent over Boost.URL; webcpp's own native, wasip2, wasip3, emscripten; its own lanes constant-time and fuzz a submodule at libs/codecs; depends on config and secure, percent also on Boost.URL
config webcpp's configuration, which every library includes first: the target, exceptions and webcpp's version, as Boost.Config is Boost's; webcpp's own native, wasip2, wasip3, emscripten a submodule at libs/config
crypto AES-GCM, the AES block cipher, random_device and secp256k1 over C libraries built from source (BearSSL, OpenSSL, libsecp256k1, ctaes), webcpp's own native, wasip2, wasip3, emscripten (OpenSSL not on emscripten); its own lane c-suites a submodule at libs/crypto; depends on hash and secure
hash hashing and key derivation: Boost.Hash2's algorithms by alias, Keccak-256, BLAKE3, HKDF, PBKDF2, Argon2 and scrypt over C backends (XKCP, BLAKE3, libsodium, BearSSL, OpenSSL, Botan) and a browser backend; a wrapper native, wasip2, wasip3, emscripten (by backend); its own lane c-suites a submodule at libs/hash; depends on config and secure
secure the side-channel and secret-in-memory primitives crypto, hash and codecs share (the DIT timing guard, erase_secret, secret<N>, constant_time_equal, declassify and constant-time building blocks); no algorithm; webcpp's own native, wasip2, wasip3, emscripten; its own lane constant-time a submodule at libs/secure; header-only, depends on config alone
xactor a deterministic actor system, webcpp's own native, wasip2, wasip3 (xactor_asio native only) a submodule at libs/xactor; the model for every port
xstate a port of XState 5.33.2's state machines and actors; depends on xactor and Boost.JSON native, wasip2, wasip3; its oracle lane a submodule at libs/xstate; the first user of the shared oracle (CODING-GUIDELINES.md chapter 12)
pratt a Pratt parser engine, generic through concepts, with a calculator built on it, webcpp's own native, emscripten, wasip2, wasip3 a submodule at libs/pratt; born with the allocation rule (CODING-GUIDELINES.md chapter 4)
wasi header-only helpers for C++ built as WebAssembly components: the HTTP handler a component exports, webcpp's own wasip2, wasip3 (response.hpp also natively); its own lanes http, the components wasmtime serves a submodule at libs/wasi; the first library built as components (chapter 4)
document a JSON document that behaves as JavaScript does (key order, JSON.stringify's bytes, the array methods), exact in decimal, in one relocatable image; webcpp's own; its parser is Boost.JSON's native, wasip2, wasip3, emscripten; its oracle lane a submodule at libs/document; its core never throws (CODING-GUIDELINES.md chapter 6)
idna internationalized domain names: Punycode, UTS 46's ToASCII and ToUnicode, conformant to IdnaTestV2, and IDNA2008's validity, over Unicode 17.0.0 tables generated into its headers; webcpp's own native, wasip2, wasip3, emscripten; its own lane tables a submodule at libs/idna; its errors are values, and its span forms allocate nothing
lexical the string formats JSON Schema names (date-time, email, hostname, ipv4/ipv6, uri, iri, uri-template, json-pointer, uuid, regex), each a validator that allocates nothing and a Boost.URL grammar rule; regex is an ECMA-262 syntax validator of its own, checked against V8; depends on idna and Boost.URL; webcpp's own native, wasip2, wasip3, emscripten; its own lanes generated and oracle a submodule at libs/formats
trystero a port of Trystero 0.26.0, serverless WebRTC rooms; its one platform backend's WebRTC, on both targets, is webrtc's, and its Asio is named webcpp::asio native, emscripten (both suspension variants); its own lanes oracle, relayed (its examples over a local relay, natively), interop, asyncify and provider-integration a submodule at libs/trystero; born with the allocation rule through std::pmr; works with exceptions on and off on both targets
webrtc WebRTC peer connections and data channels with the W3C's names in Asio's model, natively over libdatachannel's C API and in the browser over the page's own objects, with exceptions on and off; webcpp's own native, emscripten; its own lanes browser, interop and asyncify a submodule at libs/webrtc; increments 1 and 2 of 3 (CODING-GUIDELINES.md chapter 15)

The layout

webcpp/
  Jamroot             the single build configuration: finds Boost, checks its version,
                      sets what every library shares, registers each library
  AGENTS.md           how to work in the tree: the tools, the commands, the
                      lanes, the CI and the releases
  CODING-GUIDELINES.md  the rules on how code is written and every design
                      decision, with its reason: the single source of them
  README.md           what webcpp is, the prerequisites, getting started
  LICENSE_1_0.txt
  .clang-format       clang-format's style, every repository's, which a library's own may
                      extend (below)
  .clang-tidy         clang-tidy's checks, every repository's
  pyrightconfig.json  Pyright's settings for every Python file
  libs/<name>/        a library: a repository of its own, a submodule here (asio, beast, cobalt,
                      codecs, config, crypto, hash, secure, xactor, xstate, pratt, wasi,
                      trystero, document, idna, lexical, webrtc)
  third_party/        third-party code the libraries and their tests use, not webcpp's: each
                      a submodule under third_party/libs/, pinned at a commit and keeping its
                      own licence (openssl, libdatachannel, bearssl, secp256k1, bitcoin for
                      ctaes, xkcp, libsodium, blake3, and the test data wycheproof, bips,
                      hpke, JSON-Schema-Test-Suite and nativejson-benchmark), and the Jamfile that
                      declares it as /webcpp/third_party//<target> and
                      /third_party//<target> (guidelines chapter 10)
  doc/                the index page (index.adoc, Jamfile)
    releases/         each version's release notes, which the index page shows
  site/               the site, a repository of its own, webcpporg/webcpporg.github.io, a
                      submodule here: its pages, components, tools and tests (chapter 4)
  tools/
    webcpp.jam        the Jamfile API (chapter 4): webcpp.targets, webcpp.run, ...
    target.jam        the targets, and the target a toolset builds for, which webcpp.jam and
                      component.jam both read
    webcpp-mkdir.jam  the action that makes a directory of the build on Windows, which
                      webcpp.jam loads: as idempotent as b2's mkdir -p elsewhere (chapter 6)
    throw_exception.cpp  what Boost calls in place of a throw, in a user's build without
                      exceptions
    boost_json.cpp    Boost.JSON's definitions, built as /webcpp//boost_json
                      (guidelines chapter 10)
    boost_test_runner.cpp  Boost.Test's header-only framework, for webcpp.boost-test
                      (guidelines chapter 8)
    boost/            Jamfile: the compiled Boost libraries built from Boost's sources
                      (/webcpp//boost_url, boost_charconv and boost_locale)
    node-test/        the test support every test and example links (/webcpp//node-test,
                      chapter 4): include/webcpp/test/exit_status.hpp on every target, and
                      node-pre.js, the pre-js on emscripten that fails a test under node whose
                      main did not finish, and stops one past its bound
    oracle/           the shared oracle (guidelines chapter 12): oracle.jam,
                      twins.py, compare.py and their tests
    lint/             lint.sh, rules.py, compile_commands.py and their test
    doc/              the documentation toolchain: doc.jam, reference.py, doc_comments.py,
                      doc-check.py, libraries.py, counts.py, the Asciidoctor.js extensions, the
                      style
    example/          run_example.py, which runs an example and compares its output
    component/        component.jam, the rules of a WebAssembly component (webcpp.wit-bindings,
                      webcpp.serve, webcpp.serve-script), and serve.py, which serves one with
                      wasmtime and compares its answers, and its test
    drive/            drive.jam, the rule of a driven test (webcpp.drive), which a script of the
                      original's language runs over a linked program, drive.py, which runs it
                      bounded, and its test
    generated/        generated.jam, the rule of a library's generated files (chapter 4),
                      generated.py, which runs a generator and checks or writes what it writes,
                      and its test
    variants/         variants.py, which writes the manifest of a page program's suspension
                      variants (<name>.variants.json, for the page's loader) and the Markdown
                      table of their sizes (<name>.sizes.md) that webcpp.variants and
                      webcpp.size-table build (chapter 4), and its test
    node/             install.py, which installs the Node packages of the documentation, an
                      oracle and the lint once per lockfile, and its test
    report/           report.py, lanes.py, pages.py: the test matrix, and the CI verdict
    test/             the tests of the Jamroot, the compiled Boost libraries, webcpp.jam,
                      third-party code, the oracle's rules, the check of generated files,
                      the component rules, the emscripten target, the libraries webcpp does
                      not build and the doc build, their harness, and the fixture libraries
                      demo, oracle_demo, component_demo, browser_demo and node_test_demo
    ci/               matrix.py (the lanes), assemble.py (the site), download.sh and
                      helpers.sh (what the actions share), wasi-sdk.jam
                      and emsdk.jam (the lines that register the WASI and emscripten
                      toolsets), container/Dockerfile (the image of the container lanes),
                      and actions/{boost,wasi-sdk,wasmtime,wit-bindgen,wasi-wit,emsdk,
                      chrome,container,mrdocs,node}/
                      (chapter 4)
    site/             site.jam, the rules of b2 site and b2 site-serve, catalogue.py (the
                      site's libraries.json), redirect.py (the old address's two pages) and
                      their tests (chapter 4)
    release/          changelog.py, the form of a changelog, which the lint checks; release.py,
                      the release tooling; template.adoc; scratch.py and their tests
  .github/            workflows/library.yml, workflows/ci.yml, actionlint.yaml (chapter 4)
  .local/             machine-local, git-ignored (below)
  bin/                b2's build directory, git-ignored

A library's layout:

libs/<name>/
  build.jam                  project /webcpp/<name>: its headers and dependencies
  include/webcpp/<name>.hpp  the convenience header, which includes every public header but
                             one that brings an optional heavy dependency
                             (guidelines chapter 3)
  include/webcpp/<name>/...  one header per responsibility
  wit/                       the worlds of a library that builds WebAssembly components, whose
                             bindings its build.jam declares (wasi's http-p2.wit and http-p3.wit)
  test/                      Jamfile, the tests, and .clang-tidy when the tests need one
  test/oracle/               a port's oracle (guidelines chapter 12): its Jamfile,
                             the pinned original, the scripts that drive it, and the
                             twins
  example/                   Jamfile, the programs and their .expected outputs, and a served
                             program's .requests (chapter 4)
  doc/                       Jamfile, the page (<name>.adoc and its sections), mrdocs.yml,
                             and counts.py when the page counts what only it holds (chapter 3)
  doc/changelog.adoc         its changelog, the page's last appendix
  meta/libraries.json        Boost's fields, plus "port-of"
  meta/include-boundaries.json
                             the include boundaries the lint checks, when it has any
                             (guidelines chapter 9)
  meta/lint.json             the lint's rules the library asks for, when it asks for any
  README.md
  AGENTS.md                  only what is specific to this library
  LICENSE_1_0.txt
  LICENSE-<ORIGIN>.txt       the original's notice, for a port that derives from its code
  .gitignore                 doc/html/ at least, and node_modules and .node-modules/ with an oracle
  .gitattributes
  .clang-format              when the library needs one: it inherits the root's
                             (InheritParentConfig) and adds only what its code needs, with the
                             reason in a comment, as wasi's names the macros its main is
                             written between (MacroBlockBegin, MacroBlockEnd)
  .github/workflows/ci.yml   calls the superproject's library.yml (chapter 4)

A library has no Jamroot. It is developed inside a checkout of the superproject, as a Boost library is developed inside Boost: the superproject's Jamroot is its build configuration, and libs/<name> is its repository.

Prerequisites

  • Boost 1.92 or newer, installed, and, for a library that links a compiled Boost library (Boost.URL, Boost.Charconv, Boost.Locale), Boost's sources of the same version (below);
  • b2 (B2 5.5.3 measured);
  • a C++20 compiler;
  • the GCC 15 CI lane uses pinned GCC 15.3, since the Ubuntu runner's GCC 15.2 has coroutine default-argument regression PR121643. Its action extracts the official Linux-X64 image's relocatable toolchain, verifies a compile/run probe after installation and cache restoration, and selects its matching runtime. Locally, the Jamroot compiles and runs the same probe, tools/ci/actions/gcc/coroutine_probe.cpp, with the GCC 15 a user-config.jam configures, once per compiler and run of b2, and a GCC 15.2 stops the build before it compiles anything, naming PR121643 and asking for GCC 15.3 or newer;
  • Python 3.9 or newer;
  • for WebAssembly: wasi-sdk 34, with the release's platform-independent sysroot and builtins (bash tools/ci/actions/wasi-sdk/install.sh installs it so in .local/wasi-sdk), and wasmtime 50.0.1;
  • for WebAssembly components, such as wasi's: wit-bindgen 0.62.0, which generates a world's C bindings, and the wasi:http WIT of WASI 0.2.12 and 0.3.0, the wit/deps directories of the Rust crates wasip2 1.0.4 and wasip3 0.9.0, which a world resolves its packages against; wasmtime serves the components;
  • for the documentation: Node, MrDocs 2026.9.29 and clang++, and wit-bindgen and the WIT for a reference that parses a component's bindings (wasi's), and emsdk, whose em++ and clang++ read a reference for Emscripten's target, that of a library with a header that builds only on emscripten (-sWEBCPP_EMSDK=<dir>, else .local/emsdk, chapter 2);
  • for a library's oracle lane: Node and npm, with Boost and a C++ toolset;
  • for the lint: wasi-sdk 34's clang-format, clang-tidy and clang++, Node, the wasip2 and wasip3 toolsets, the emscripten toolset when a library declares emscripten, and wit-bindgen and the WIT, since it reads what those toolsets compile;
  • for emscripten: Emscripten 6.0.11, from emsdk, and Node, which runs its programs; the tests of the build need it too;
  • for trystero: nothing installed, with the pinned submodules initialised: libsecp256k1 0.8.0 is /third_party//secp256k1, built by b2 from the pinned third_party/libs/secp256k1 (small tables on emscripten, large natively; <webcpp-secp256k1-tables> asks otherwise). No library of libs/ needs an externally provisioned dependency today, though webcpp.external and webcpp-require-external=on stay for a later one;
  • for crypto: nothing installed, with the pinned submodules initialised: git submodule update --init third_party/libs/bearssl third_party/libs/secp256k1 third_party/libs/bitcoin third_party/libs/wycheproof third_party/libs/bips third_party/libs/ed25519-speccheck third_party/libs/hpke, and third_party/libs/openssl for its OpenSSL backend (below); b2 builds every backend from its sources;
  • for Botan (/third_party//botan, webcpp::hash's backends::botan and later webcpp::crypto's): nothing installed, with the pinned submodule initialised (git submodule update --init third_party/libs/botan); b2 runs Botan's own configure.py with Python 3 once per target and compiles its sources; native and Emscripten, with exceptions;
  • for native Trystero: CMake and Make (nmake on Windows), and the pinned third_party/libs/libdatachannel checkout with its required nested sources. Initialize it, and the libsecp256k1 every room links, with git submodule update --init --recursive third_party/libs/libdatachannel third_party/libs/secp256k1. B2 builds static libdatachannel and its nested dependencies with the consumer's compiler and runtime settings. Every consumer of /webcpp/third_party//libdatachannel requires threading=multi: a single-thread request is refused, since libdatachannel runs worker threads of its own. Native Trystero reaches it through webrtc, which calls its C API, and works with exceptions on and off;
  • for native or WASIp2/P3 guest TLS: Python 3, Perl, Make (nmake on Windows), the selected compiler and third_party/libs/openssl, initialized with git submodule update --init third_party/libs/openssl. B2 builds the pinned OpenSSL sources and matching generated headers, each configuration once, in bin/third_party/openssl/config-<hash>, which its inputs and its command name and b2 -a keeps, as it does libdatachannel's: removing the directory builds it again (CODING-GUIDELINES.md chapter 15). Native Trystero's libdatachannel uses that same provider. Neither OPENSSL_ROOT nor LIBDATACHANNEL_ROOT selects a separate installed copy. Source archives contain the required sources and do not require Git for these builds. The lint prepares the matching headers through a separate Configure and make build_generated action. Archives and upstream test proofs still require the full provider action (CODING-GUIDELINES.md chapter 9).

Each toolchain is installed by hand and configured in user-config.jam, until webcpp bundles the toolchains (CODING-GUIDELINES.md chapter 16). b2 reads ~/user-config.jam, or the file --user-config=<file> names:

using clang ;      # or gcc, or msvc: the native toolset
using boost : 1.92 : <include>/opt/homebrew/opt/boost/include <library>/opt/homebrew/opt/boost/lib ;
local wasi-sdk = /path/to/wasi-sdk ;
modules.poke : WASI_SDK : $(wasi-sdk) ;
using clang : wasip2 : $(wasi-sdk)/bin/clang++
  : <cflags>--target=wasm32-wasip2 <cxxflags>--target=wasm32-wasip2
    <linkflags>--target=wasm32-wasip2
    <archiver>$(wasi-sdk)/bin/llvm-ar <ranlib>$(wasi-sdk)/bin/llvm-ranlib ;
using clang : wasip3 : $(wasi-sdk)/bin/clang++
  : <cflags>--target=wasm32-wasip3 <cxxflags>--target=wasm32-wasip3
    <linkflags>--target=wasm32-wasip3
    <archiver>$(wasi-sdk)/bin/llvm-ar <ranlib>$(wasi-sdk)/bin/llvm-ranlib ;

The lines from local wasi-sdk on are the regions wasi-sdk, wasip2 and wasip3 of tools/ci/wasi-sdk.jam, which the CI writes a lane's toolset from and wasi's page includes, so that neither drifts from the other. The region wasi-sdk also gives the build wasi-sdk's directory as WASI_SDK, the one a component that a script builds (webcpp.serve-script) is built with.

The tools of a component are looked up only when b2 generates a world's bindings (on clang-wasip2 or clang-wasip3, or for the explicit <bindings>-headers of a reference) and when a served test runs, so a native b2 test needs none of them. When one is needed and not found, the build stops, naming it and every place it looked:

  • wit-bindgen: -sWIT_BINDGEN=<path>, else .local/wit-bindgen/wit-bindgen, else wit-bindgen on PATH;
  • the WIT of each version: -sWASI_WIT_P2=<dir> and -sWASI_WIT_P3=<dir>, each the wit/deps directory of its crate, else .local/wasi-wit/p2 and .local/wasi-wit/p3;
  • wasmtime: testing.launcher=wasmtime runs the one on PATH; a served test's is -sWASMTIME=<path>, else wasmtime on PATH, looked up when the test runs, which fails naming it;
  • wasi-sdk, for a component that a script builds: -sWASI_SDK=<dir>, which the region wasi-sdk above gives, else .local/wasi-sdk, a directory that holds bin/clang++.

A user-config.jam may set any of them as -s does, with modules.poke : WIT_BINDGEN : <path> ;.

When Boost cannot be used, the build stops before it compiles anything and prints the exact using boost line to add. The Jamroot reads the version of the configured Boost from its boost/version.hpp, with grep, or with findstr on Windows, where b2 runs a command with cmd.exe, and keys its cached check on it; a Boost whose #define BOOST_VERSION <number> line it cannot read stops the build too, naming the directory.

Boost's sources. A compiled Boost library that a webcpp library needs is built from Boost's own sources, for every target, as Boost.JSON's definitions are: /webcpp//boost_url, /webcpp//boost_charconv and /webcpp//boost_locale (tools/boost/Jamfile). An installed Boost has none (Homebrew's ships its own libboost_url and no libs/url/src), so the build reads them from -sBOOST_SOURCE=<dir> on b2's command line (or -s BOOST_SOURCE=<dir>), which wins, else BOOST_SOURCE as a user-config.jam's modules.poke : BOOST_SOURCE : <dir> ; or the environment gives it, which b2 cannot tell apart (chapter 6), else .local/boost-source: a tree with Boost's boost/version.hpp and the libs/<library>/src of each library, which bash tools/ci/actions/boost/install.sh source .local/boost-source fills from the archive the CI uses, checked against its SHA-256. It writes last a marker, .webcpp-boost-source, with the version and the archive's SHA-256, and replaces only a directory that holds one: any other, a user's, an installed Boost's include directory or a whole Boost tree, is refused by name before anything is downloaded, and a tree it wrote before the marker existed is removed by hand once. When a target needs the tree, the build stops if it is missing, naming both places, if its version is not the configured Boost's, naming both versions, if the configured Boost's version is unknown, Boost being on the compiler's default include path, naming the using boost line to add, and if it lacks the library's sources; a build that needs none never looks.

Cobalt shipped sources. libs/cobalt/sources.json declares the core, runner, optional SSL and additional threaded sources per target. The independent library owns them. /webcpp/cobalt//core is its plain core; /webcpp/cobalt//cobalt supplies exactly one runner for a user-defined co_main. Cobalt's targets have one name each: neither Asio nor the Jamroot declares an alias to them. Native core and runner sources are unchanged Boost 1.92. Wasm implementations are shipped under explicit WebCPP paths; consumers never run an importer or prepare replacement Boost headers. Cobalt does not require an external BOOST_SOURCE tree. Boost.URL, Charconv, Locale and Context retain the source requirements above.

Compile the application, core, runner and optional SSL with matching exception, thread and Cobalt executor/PMR settings. A custom configuration header is preincluded in every source. Native sources use Boost's configuration vocabulary; Wasm maps those settings to its isolated implementation. Its generated B2 source list and external compiler/CMake recipes consume the same inventory. Asio has its own runtime inventory and private WASI SDK ABI checks under libs/asio/src. The consumer test creates and extracts a source archive, validates hashes and compiler dependencies, and rejects accidental checkout inputs.

/webcpp/cobalt//io_ssl selects WebCPP's corrected wrapper for native and WASI, with the shared source-built OpenSSL/CA provider. This is the owner-approved exception to native Boost identity. /webcpp/cobalt//cobalt_ssl adds the runner. Plain Cobalt does not link OpenSSL. Browser HTTPS/WSS uses the browser's TLS. State, transfer cancellation and shutdown drivers live in libs/cobalt/test/tls. Native upstream OpenSSL tests remain distinct from WebCPP TLS witnesses and from WASI tests.

Native upstream limitations. Native Cobalt retains Boost's composition, accept, write-at and missing-no-exceptions-promise-hook limitations, documented by its probes. Those core paths do not receive Wasm corrections. Native Asio retains Boost's Windows IOCP worker/timer allocation limitation. Historical patch inputs survive in libs/asio/upstream/reference/windows-iocp, without a consumer build rule. A dry run on this machine is not Windows runtime evidence.

Cobalt without exceptions. A build that uses /webcpp/cobalt//core with exception-handling=off emits a non-fatal configuration warning with boostorg/cobalt#287 and recommends enabling exception handling. Boost 1.92 with libc++ can abort when a pending task is moved, including moves performed inside Cobalt. This warning describes a runtime risk; it does not claim to detect a move or prove a program safe. It appears once per distinct Cobalt build configuration in each b2 invocation, including dry runs, and never for an exceptions-enabled Cobalt configuration or an unrelated target. It does not change the exception setting or the build exit status. Compiler and lint warnings still follow their existing warnings-as-errors policies; a b2 warning is not a compiler diagnostic. Keep the warning until an upstream fix has been verified, rather than assuming a newer Boost release fixes the issue.

Machine-local setup. .local/ is git-ignored and holds what one machine needs: .local/user-config.jam, .local/wasi-sdk/, .local/mrdocs/, .local/wit-bindgen/ and .local/wasi-wit/p2 and p3, .local/emsdk (an install of emsdk, or a link to one) with Emscripten's cache in .local/emscripten-cache. Source-built libsecp256k1, OpenSSL and libdatachannel live under the B2 build directory, separated by the effective compiler configuration. A tool the build looks up itself is taken from the path its -s option gives, else from .local/, else from PATH: MrDocs (-sMRDOCS), wit-bindgen and the WIT (above); wasi-sdk is where the using clang lines of user-config.jam name it, and, for a script's component, -sWASI_SDK (above). The emsdk is where the using emscripten line of user-config.jam names its em++, for the emscripten toolset, and, for a reference read for Emscripten's target, -sWEBCPP_EMSDK=<dir> on b2's command line, else .local/emsdk (chapter 2): not a modules.poke of user-config.jam, nor the environment's EMSDK. tools/lint/compile_commands.py runs b2 with .local/user-config.jam, else with the file $WEBCPP_USER_CONFIG names, else with b2's own search. The tests of the build and of the tools read .local/user-config.jam, else the file $WEBCPP_USER_CONFIG names, and stop with an error when neither exists (tools/test/harness.py); each scratch copy links the checkout's .local/boost-source when it has one, and a test that needs wit-bindgen and the WIT links .local/wit-bindgen, .local/wasi-wit and .local/wasi-sdk, or the directories $WIT_BINDGEN_ROOT, $WASI_WIT_ROOT and $WASI_SDK name, into its scratch copy, one that needs Emscripten .local/emsdk, or $EMSDK_ROOT, and one that needs MrDocs .local/mrdocs, or $MRDOCS_ROOT. Emscripten writes its cache where EM_CACHE names, else inside the emsdk: every b2 of a test gets the cache the shell's EM_CACHE names, as the CI's emsdk action names the one it restores with its system libraries built, so that no test builds them again; else one of its run, beside its scratch copies. Either is named by its resolved path, since Emscripten 6.0.11 builds a system library from a relative path that misses its sources through a link, as macOS's $TMPDIR is one. Sharing it is safe: Emscripten builds a library that is missing under a lock of the cache's own and looks again once it holds it, and three test runs at once on one empty cache pass. Each b2 also gets EMCC_SKIP_SANITY_CHECK=1: Emscripten checks its configuration when it first meets a cache, which a run's own is in every run, and prints "Running sanity checks" into the output of the b2 that configures the toolset, which a test compares whole (b2 -d0 declared-targets); the check's one other use, clearing a cache made by another toolchain, has nothing to clear in a cache of the run's own, and the CI's was checked when the action warmed it. The doc build finds MrDocs at .local/mrdocs/bin/mrdocs. b2 itself reads it only when told: b2 --user-config=.local/user-config.jam ....

The build commands

Command What it does
b2 test every library's tests, natively
b2 example every library's examples: each is built, run with its .input as its standard input when it has one, and its output compared with its .expected
b2 doc the index page, doc/html/index.html, and every library's page, libs/<name>/doc/html/index.html
b2 doc -sWEBCPP_INDEX=site the same, with the index linking each page where the site serves it, libs/<name>/ (chapter 3)
b2 libs/<name>/test one library's tests; libs/<name>/example and libs/<name>/doc likewise
b2 libs/<name>/test//<test> one test, while working on it (scheduler)
b2 libs/<name>/doc//reference one library's API reference alone, MrDocs strict
b2 toolset=clang-wasip2 testing.launcher=wasmtime libs/<name>/test libs/<name>/example the same for wasm32-wasip2; one toolset per command
b2 toolset=clang-wasip3 testing.launcher=tools/boost/asio-wasip3/run.sh libs/<name>/test libs/<name>/example wasm32-wasip3 with the test networking capabilities
b2 toolset=emscripten libs/<name>/test libs/<name>/example the same for emscripten, whose programs b2's toolset runs with node itself: never with a testing.launcher (chapter 4)
b2 install --prefix=<dir> copies every library's headers to <dir>/include/webcpp/, and its licence files, LICENSE_1_0.txt and a port's LICENSE-<ORIGIN>.txt, beside them in <dir>/include/webcpp/<name>/
b2 declared-targets -d0 prints each <library> <target> pair the libraries declare: the CI's lanes
b2 declared-lanes -d0 prints each <library> <lane> <directory> <kind> line of a library's own lanes, such as its oracle's, and <library> <lane> <directory> <target> <kind> once per target for a lane that names the targets it runs on; the kind is original for a lane that runs the original's language, else programs (CODING-GUIDELINES.md chapter 12 and chapter 4)
b2 toolset=clang-wasip2 testing.launcher=wasmtime libs/<name>/test//<lane> an own lane on wasip2, such as wasi's served tests, libs/wasi/test//http and libs/wasi/example//http (chapter 4)
b2 -sWIT_BINDGEN=<path> -sWASI_WIT_P2=<dir> -sWASI_WIT_P3=<dir> -sWASMTIME=<path> ... any of these with the tools of a component where the defaults do not find them (above)
b2 libs/<name>/test/oracle//oracle a port's oracle lane: the original runs the cases and the twins, and the results are compared (CODING-GUIDELINES.md chapter 12)
b2 libs/<name>/test/oracle//update-expected writes the original's results again, the only writer of an expected result (CODING-GUIDELINES.md chapter 12)
b2 libs/<name>/test//generated-<name> a library's generated files checked against their generator: written into the build directory and compared, byte for byte (chapter 4)
b2 libs/<name>/test//update-generated writes every generated file of that Jamfile again, the only writer of a generated file (chapter 4)
b2 -a ... any of these from scratch; the only build that counts as evidence
tools/lint/lint.sh --clang-format <wasi-sdk>/bin/clang-format --clang-tidy <wasi-sdk>/bin/clang-tidy the lint, of the superproject and every library (CODING-GUIDELINES.md chapter 9)
python3 tools/<dir>/<name>_test.py a test of the build or of a tool (CODING-GUIDELINES.md chapter 1)
python3 tools/ci/matrix.py plan, own-lanes, lane, own-lane, register, report the CI's lanes and own lanes, run the way the CI runs them (chapter 4)
b2 site, b2 site-serve the whole site, the site's pages with every library's page and the report, into bin/site/, every link checked (tools/site/site.jam, tools/ci/assemble.py); site-serve then serves it on http://127.0.0.1:8765/; -sWEBCPP_SITE=release -sWEBCPP_SITE_VERSION=<version> builds the release channel (chapter 4)
b2 check-release what a tag needs: every library's change has a line, the release notes are complete, and the version agrees everywhere (chapter 5)
b2 whats-new writes the skeleton of a version's "What's new", from its release notes (chapter 5)
b2 dist writes the version's reproducible archive and its checksum (chapter 5)

2. The API reference

The rules of a Doc Comment, its format and what every public symbol needs, are CODING-GUIDELINES.md chapter 7. This chapter is how the reference is generated from them, and where it sits.

Generation

The reference is generated by MrDocs 2026.9.29, always to AsciiDoc and as a single page, from the library's Doc Comments. webcpp.reference <name> ; in doc/Jamfile declares it; tools/doc/reference.py runs it:

  • the input is a compilation database of one aggregate translation unit, which includes every public header (the same one the lint analyses), read with the include directories and defines of the library's target and of the requirements webcpp.reference <name> : <requirements> * ; gives, natively: a library whose headers build only for WASI gives those a native parse needs, the explicit target <bindings>-headers of webcpp.wit-bindings, which generates the bindings on any toolset, and the macro of one version;
  • a library with a header that builds only on emscripten gives /webcpp//emscripten-reference, whose usage requirements give the reference the emsdk (<webcpp-emsdk>): the translation unit is then read for Emscripten's target, as the emsdk's em++ compiles it with -fwasm-exceptions, with the words em++ -fwasm-exceptions --cflags prints (its target wasm32-unknown-emscripten and its sysroot in Emscripten's cache among them) less its -mllvm options, which a parse never reaches: doc_comments.py reads it with the emsdk's clang++, and MrDocs, which adds the include directories that a command's compiler reports when run alone, with no environment, reads a command whose compiler is emscripten-clang++, a script reference.py writes, which runs the emsdk's clang++ with those words, so that the directories are Emscripten's (the emsdk's clang++ alone names no target and reports none, and MrDocs would take the host compiler's). Emscripten's own headers hold only for wasm32's types: <emscripten/wire.h> declares a binding of long and one of int64_t, which a native parse on Linux x86-64, where int64_t is long, reads as one declared twice (the CI's red docs job of 2026-10-10). Every header is read for that target, in the one translation unit: MrDocs merges the symbols of two translation units by an identifier that holds the types of a function's parameters, and the host's standard library and Emscripten's give one function two (trystero's reference read as a native and an emscripten translation unit had 555 sections for 461). Such a library also gives the target of its backend, if it has one, which brings that backend's dependencies, and the defines that parse needs, which a requirement conditioned on the emscripten toolset does not give a reference built natively; trystero's gives its platform backend's, whose Asio and Beast are webcpp::asio and webcpp::beast, their browser implementations for that target, so that no define of Boost.Asio's is needed: webcpp.reference trystero : <library>/webcpp/trystero//platform <threading>multi <library>/webcpp//emscripten-reference ;. Read so, trystero's reference is the same on Linux and on macOS, byte for byte. The emsdk is -sWEBCPP_EMSDK=<dir>, read from b2's command line alone, else .local/emsdk, never the environment's EMSDK, which emsdk_env.sh exports and b2 would read as -sEMSDK; its upstream/emscripten/emscripten-version.txt must name 6.0.11, the version the emsdk action pins, and Emscripten's cache is where EM_CACHE names, as for any em++ (chapter 1). A build that uses the target stops, naming both places, when its em++ or its clang++ is not there, and naming both versions on another. A header the reference cannot parse fails it, naming the header;
  • headers that branch by that macro have each branch's Doc Comments checked: webcpp.reference <name> : <requirements> * : <also-checked> * ; gives the other version's requirements, with which reference.py runs again, MrDocs and doc_comments.py both, as a sibling of the reference that the target reference and the page build too, and whose output no page shows. wasi's doc Jamfile gives wasip2's bindings and macro, then wasip3's, so an undocumented macro or detail symbol of the wasip3 branch fails the doc build. The check is never a dependency of the reference: a dependency's usage requirements, the other version's bindings, would reach the reference's parse;
  • the shared settings are tools/doc/mrdocs.yml.in: generator: adoc, multipage: false, embedded: true, warn-as-error: true, auto-function-metadata: false, auto-relates: false, every warn-* on, the symbols of webcpp::<name>::**, detail namespaces as implementation-defined, the macros WEBCPP_<NAME>_* except the include guards, every WEBCPP_* for config, base-url: https://github.com/webcpporg/<name>/blob/main/ and inherit-base-members: never (below);
  • tools/doc/doc_comments.py then checks with clang++ what MrDocs does not (below);
  • the page includes the result with include::{reference}[leveloffset=+1].

auto-function-metadata and auto-relates are off because, at their defaults, they document a parameter with its type's brief and count a class with related functions as documented, which hid 48 findings on the first library measured. inherit-base-members is never, so a derived class lists its own members alone and an interface's are in the interface's section: MrDocs reads an override whose parameter is spelled through an alias as an overload of its own, and at its default copies the interface's member into the derived class under the interface's anchor, which Asciidoctor refuses as a duplicate; no reference of xactor, xstate, wasi or pratt changed with it. A link MrDocs writes inside another link's text, link:#a[handler<void(link:#b[bytes])>], which Asciidoctor would end at the inner ], is written as its text, the outer link kept (reference.py).

A library's doc/mrdocs.yml holds presentation keys only. It may set sort-members, sort-members-by, sort-namespace-members-by, sort-members-ctors-1st, sort-members-dtors-1st, sort-members-assignment-1st, sort-members-conversion-last, sort-members-relational-last, overloads, sfinae, inherit-base-members, inherit-hidden-friends, legible-names and show-enum-constants. Any other key (what is documented, the input, the output, a warning) is refused and fails the reference: every library is documented as strictly as every other. xactor's sets show-enum-constants: true.

The commands

  • Allowed: @brief, @param, @tparam, @return, @returns, @throws, @pre, @post, @note, @see, @code/@endcode, @details, @par, @copydoc, @ref (and the same with \).
  • Forbidden, because MrDocs drops them without a word: @sa, @deprecated, @since, @todo, @retval, and every other command. The lint names each.
  • A literal @ in prose is written \@; a bare @ that starts no allowed command fails the lint.
  • No colon after @ref x. MrDocs drops the colon: write the result of @ref status_of, which, never @ref status_of: it. The lint rejects it. A possessive is fine (@ref scheduler's queue); MrDocs renders it.
  • @see "<title>" sends the reader to a section of the library's page by its title, exactly as the heading writes it after its = marks, in quotes, and on one line: @see "Writing an actor logic", in the guide. The doc build fails on a title that names no section of the page, or that wraps onto a second line, since MrDocs writes the title as plain text that no link checks. A section renamed changes its @see lines in the same commit.
  • A (doc: #<anchor>) in a // comment of the library (code, test or example) sends its reader to an anchor of the page, such as a guarantee: (doc: #xactor-invariant-13), or a list, (doc: #a, #b and #c), or a range, (doc: #a to #b). The doc build fails on an anchor that the page does not define. In a Doc Comment, use @see with the section's title.
  • Never link by hand to an overload's anchor: MrDocs gives it a hash suffix that changes.
  • File-level comments do not reach the reference. A header's opening /** ... */ is for its reader; what the user needs is in the symbols' comments.

What the doc build does after MrDocs

postprocess.mjs decodes the character references MrDocs writes for the characters AsciiDoc would read as markup, and the U+2010 it writes for an ASCII hyphen; reference.py drops the near-empty sections of the global namespace and of webcpp, so the reference starts at webcpp::<name>, with the library's macros, when it has any, in a section "Macros" of their own.

Where the reference sits

It replaces any hand-written reference chapter. The numbered guarantees stay in the guide part of the page, and a reference like (doc: #anchor) in a Doc Comment becomes @see "<title>".

3. Documentation

Shipped Boost implementation provenance

Asio, Cobalt and Beast ship their Wasm implementation explicitly under their own paths. Native Cobalt core/runner sources remain unchanged upstream snapshots; the owner approved the separately corrected native SSL wrapper on 2026-11-06. No consumer build applies a patch or shadows an installed Boost include tree.

upstream/generated.json identifies maintainer-generated implementation and forwarding files by hash. tools/shipped_sources.py verifies every entry before lint preserves its upstream style or the reference omits inherited declarations. A missing, changed or escaping path fails this integrity gate. The importer, correction inputs and hand-written wrappers/adapters remain subject to all owned source rules. Regeneration uses the pinned input and correction manifests.

The owned-header aggregate and MrDocs input document WebCPP's additions and configuration; guides link the matching upstream reference for inherited APIs. The input list excludes only verified generated outputs. This does not disable MrDocs warnings or permit a library-specific arbitrary reference filter. Actual consumer/application tests still compile the imported implementation. Generated forwarders additionally require distribution/header coverage for their supported profiles; omitting them from the documentation aggregate is not test evidence.

The page

Each library has one AsciiDoc page, doc/<name>.adoc, with its sections in files of their own beside it, built by doc/Jamfile:

import webcpp ;

webcpp.doc <name> : <name>.adoc ;
webcpp.reference <name> ;

Either rule declared in another directory stops the build, naming the rule and the directory, and so does a page whose Jamfile declares no reference, or a reference whose Jamfile declares no page. b2 libs/<name>/doc converts the page with Asciidoctor.js into libs/<name>/doc/html/index.html, with the reference included. The page sets its own title and attributes, as xactor's does:

= <name>: <what it is> for {cpp}
:toc: left
:toclevels: 1
:idprefix:
:sectanchors:
:example-caption!:
:attribute-missing: warn

The doc build provides {examples} (the library's example/ directory), {reference}, {twins} (the twin directory, for a library whose oracle declares twins, CODING-GUIDELINES.md chapter 12), {webcpp-root} (the superproject, whose tracked files a page includes by tag, below), {library-root} (the library's own directory, whose tracked files it includes the same way), the counts and the links to other pages (below), and sets the highlighter, the shared style (tools/doc/docinfo.html, the system's fonts, no web fonts), no date and no footer: a page sets none of these. In that style a table too wide for the page scrolls in its own box, and an identifier breaks only between its parts.

What a page holds:

  • the guide, taught the way the original's documentation teaches, concept by concept, with C++ only in listings: each concept's purpose, its smallest example, its variations and its rules. Each section has an anchor that starts with the library's name, [#xactor-testing];
  • the guarantees, numbered, each with an anchor named after its number, . [[xactor-invariant-1]]The messages of one mailbox are handled in the order they were enqueued. A guarantee keeps its number and its anchor forever, since code, tests and comments cite them;
  • a testing chapter: how a program tests what it builds with the library, how the library itself is tested, on which targets, with which commands, and where the test matrix is (https://webcpporg.github.io/report/);
  • the reference, include::{reference}[leveloffset=+1], under a section [#reference];
  • the appendix "Differences" for a port (CODING-GUIDELINES.md chapter 11);
  • the appendix Changelog, include::changelog.adoc[], last (chapter 5).

Every listing is a compiled example, and every shown output comes from a .expected file. A listing includes a region of an example, marked in the program by // tag::<name>[] and // end::<name>[] lines:

[source]
----
include::{examples}/xactor_quick_start.cpp[tag=messages,indent=0]
----

and the output it prints, which b2 example compares on every build:

[source]
----
include::{examples}/xactor_quick_start.expected[]
----

A listing of shell commands is [source,bash]; the only languages a page may use are C++ (the default), JavaScript (a twin's code), JSON and bash. A listing of anything else, a WIT world, a Jamfile's lines or a served test's requests, is a [listing] block, which stays plain: a ---- block with no style is C++, which must be an include of an example, or a tagged region of a file of the library's test/ or example/, which its Jamfiles compile, include::{library-root}/test/allocation_test.cpp[tag=bind_allocator].

A page shows the build's own configuration as it is, never a copy: it includes a region of a file the superproject's git tracks, include::{webcpp-root}/tools/ci/wasi-sdk.jam[tag=wasip2], as wasi's page does the lines that register the WASI toolsets, and a region of a file its library's own git tracks for the library's own build, the dependencies its build.jam declares or a test Jamfile's lines, include::{library-root}/build.jam[tag=dependencies].

The Node packages of the doc build, Asciidoctor.js and highlight.js, are installed by tools/node/install.py with npm ci, once per lockfile under tools/doc/.node-modules/, linked at tools/doc/node_modules, under a lock, so that doc builds at once share one install; the install of an older lockfile is removed once a build no longer may read it. The lint's Pyright and an oracle's original are installed the same way.

What doc-check enforces

tools/doc/doc-check.py runs before the page is converted, and again on the rendered HTML; any finding, and any warning of Asciidoctor's, fails the build:

  • every .adoc under doc/ is reached from the page's include:: graph;
  • every example's code or output is shown, every block's language is allowed, C++ is shown only as an include of an example or of a tagged region of the library's test/ or example/, and the page includes the reference;
  • every program an example Jamfile links and never runs (webcpp.link), which doc.jam gives as --linked <program.cpp>, is shown by an include of its code, and an .expected beside one is a fault (" is linked, never run: it has no output to compare");
  • every include names a file that exists, inside doc/, {examples} or {twins}; an output's include names a program that exists;
  • an include of {webcpp-root}/<path> names a region, tag= or tags=, of a file the superproject's git tracks, which holds that region, and one of {library-root}/<path> a region of a file the library's own git tracks: an untracked file, a link git does not track, a missing file, a whole file and lines chosen by number, which drift, each fail, and so does a library directory with no git of its own; an attribute the page sets to either root is that root, checked the same way. Under libs/<library>/, {webcpp-root} names a file the library's own git tracks when libs/<library> is a repository of its own, as the release notes include a library's changelog, and one the superproject's git tracks when it is not;
  • every (doc: #anchor) and index.html#anchor of the library's files names an anchor the page defines, and every @see "<title>" a section;
  • every (doc: <library>#<anchor>) of the library's files, and every link of the rendered page into another library's page, names an anchor that page defines, as the build made it first (below);
  • every C++ block of the library's README is opened by a comment <!-- include::<file>[<attributes>] --> and equals that region of the file, as an include would give it;
  • no line inside a table starts with // (Asciidoctor drops it as a comment), and no ++ appears in prose (two of them swallow what lies between): write {cpp};
  • the rendered page has no cross-reference left as text, no stray ++ or backtick, no undecoded escape of MrDocs's, no U+2010, no em dash, which Asciidoctor writes for -- even inside inline code (xn\--bcher keeps the two hyphens), none of Asciidoctor's other replacements inside inline code, an ellipsis, an arrow, (C), (R), (TM) or a curly apostrophe, which change the code (+p->f(...)+ keeps it as written), no link inside inline code, which Asciidoctor makes of a URL there (\http://a/?[x] or +http://a/?[x]+ keeps it as text), but for MrDocs's, the whole of the code one link, to a symbol's section or to the header where it is declared, no <wbr>, after which WebKit paints a part of a name twice at some widths (postprocess.mjs marks a break as an empty <span class="wbr">, whose zero-width space the style generates and no copy reads), and no link to the dropped #index or #webcpp sections.

Counts

A page never types how many examples, tests, headers or twins its library has: webcpp.doc gives it attributes that tools/doc/counts.py computes at every build, so that no count drifts from the tree:

  • from the programs b2 records as it loads the library's test and example Jamfiles: {n-examples} and {n-examples-<target>}, {n-tests} and {n-tests-<target>} (each header compiled alone is one test, and so is each served component, each linked program, each driven test and each same-program pair), {n-served} and {n-served-<target>}, the served components alone, {n-linked} and {n-linked-<target>}, the programs webcpp.link links and never runs, {n-driven} and {n-driven-<target>}, the tests webcpp.drive drives, {n-boost-test-suites} and {n-headers};
  • for a library whose oracle declares twins, from twins.py --list: {n-twins-agreeing}, {n-twins-divergent}, {n-examples-without-twin} and {n-examples-with-original};
  • from the library's own doc/counts.py, when it has one, run with the library's directory as its one argument: each line <name>=<number> it prints, a count of what only that library holds (xstate's counts the cases of its fixtures, {n-machine-cases} among them).

A count that finds nothing fails the build rather than put a zero on the page, and so does a name of a library's own that is also a generic one. A count reads as English writes a number, with a thousands separator, 1,234; a library's own counts.py prints plain digits, n-machine-steps=1234.

Links between pages

A page links another library's page as link:{webcpp-libs}/<library>/{webcpp-page}#<anchor>[...], with two attributes webcpp.doc sets by the layout: where b2 builds the pages, by default, or where the site serves them, with -sWEBCPP_INDEX=site (chapter 4). Such a link written any other way after {webcpp-libs}/ is a fault. A // comment of the library's files sends its reader to another library's page with (doc: <library>#<anchor>), or a list or a range of them, as with its own page; a Doc Comment still uses @see (CODING-GUIDELINES.md chapter 7). The build makes every linked page first, and the check of the rendered page fails on an anchor that page does not define, and on an overload's anchor, which ends in -0<digit> and which MrDocs may renumber.

The index page

doc/index.adoc, built by doc/Jamfile (webcpp.index index.adoc ;), introduces webcpp and includes, at {libraries}, the table that tools/doc/libraries.py writes from every library's meta/libraries.json: its name, linked to its page, its description, and what it ports, linked to the original, or "original" for a library of webcpp's own ("port-of": null). The pages are those the build declares: tools/doc/doc.jam loads every library's doc/Jamfile and gives libraries.py the page each declares with webcpp.doc, so that no Jamfile's text is read a second time. A library that declares none, or whose page is not there, fails the table, named. b2 doc builds it with every library's page.

The table links a page as {library-pages}<name>/{library-page}, two attributes tools/doc/doc.jam converts the index with. By default they point where b2 builds the page, ../../libs/<name>/doc/html/index.html from doc/html/; with -sWEBCPP_INDEX=site they point where the site serves it, libs/<name>/, beside the index at the site's root (chapter 4). Any other value stops the build.

One doc build at a time. A doc build writes doc/html/ and libs/<name>/doc/html/ inside the tree, so two concurrent doc builds would write the same files.

The index also shows each version's release notes, doc/releases/, newest first (chapter 5). The notes name a library only once it is a submodule, since the site's link check refuses a page that is not there.

4. Tests, lanes, the report, the site and CI

Targets

A target is what a program is built for:

Target Toolset Runs with
native any toolset not below: gcc, clang, msvc, darwin the host
emscripten b2's emscripten, wasm32, single-threaded, static node, run by the toolset itself; no testing.launcher
wasip2 clang-wasip2, a clang registered against wasi-sdk with version wasip2 testing.launcher=wasmtime; a component, wasmtime serve (below)
wasip3 clang-wasip3, likewise testing.launcher=tools/boost/asio-wasip3/run.sh; a component, wasmtime serve (below)

A Jamfile declares its default with webcpp.targets, a program can override it with its own targets, and with no declaration a program is built for native only. For any other target, the program gets <build>no and b2 skips it without a word. This filter is conditioned on <toolset> and its version only, never on a derived feature (chapter 6).

On emscripten the Jamroot builds wasm32, single-threaded and static (its region emscripten-target): browsers do not all run memory64, and an address-model=64 request would add -sMEMORY64=1; pthreads need cross-origin isolation in a page; and Emscripten's shared libraries are experimental. b2's toolset runs a program's JavaScript with the node it found, so a build that also gives testing.launcher stops ("webcpp: b2's emscripten toolset runs a program with node itself; give no testing.launcher on emscripten", chapter 6). Every program that node runs (webcpp.run, webcpp.run-fail, webcpp.example) links -sNODERAWFS=1, so that it reads the host's files and its standard input: without it, node gives it an empty file system of Emscripten's own, and a test reads its input file as empty. No other program gets it. A program of webcpp.run, webcpp.run-fail or webcpp.example that reads a fixed path, as a C library's own tests read theirs (libsodium's /test-data), asks for <webcpp-node-raw-fs>off: it links Emscripten's NODEFS (-lnodefs.js) in place of -sNODERAWFS=1, under which nothing can be mounted, and mounts the host's directories itself where it reads them (FS.mount); it then reads no standard input of the host's, so an example with a <stem>.input does not ask for it.

A program on emscripten links at its compile's level of optimization (the Jamroot's region emscripten-link-optimization): -O0 for <optimization>off, -O3 for speed, -Os for space, -O1 for minimal and -Og for debug, so -O3 in a release build and -O0 in a debug one. b2 5.5.3's toolset gives <optimization> to the compile alone, and em++ given no level links at -O0 (chapter 6), so a release program was linked without optimization: Binaryen's wasm-opt never ran on it, and Asyncify instrumented it unoptimized, saving whole frames at each suspension. Measured with Emscripten 6.0.11, asio's release test timers went from 735,400 bytes of .wasm to 489,216, and the deepest suspension of its asyncify_stack test from 2,900 bytes to 388. The level is among the toolset's own options, before <linkflags>, so a program's own -O<n> there comes last, and em++ keeps it. A link at -O1 or above also turns Emscripten's ASSERTIONS off, and a release link at -O3 minifies the JavaScript, drops the runtime functions nothing calls and, outside JSPI, gives the module's exports short names: an abort prints Aborted() without the reason assertions add, and a page or a driver finds only what the program uses. tools/test/emscripten_test.py pins each level and its order.

A program on wasip2 or wasip3 built without debug symbols carries no debug information (the Jamroot's region wasi-strip-debug): with <debug-symbols>off, as a release build has it, it links with -Wl,--strip-debug, which wasm-component-ld passes to wasm-ld, so the core module of the component has no .debug section. wasi-sdk's prebuilt libc++, libc++abi and libunwind carry DWARF, which wasm-ld otherwise copies into every program that links them, a release one too: xactor's release example xactor_quick_start was 3,489,365 bytes on wasip2 and is 397,678. A debug build, or a release that asks for debug-symbols=on, keeps it. tools/test/webcpp_jam_test.py reads every custom section of a release, a debug and a debug-symbols=on program on both targets, nested core modules included. An Emscripten release link, at -O3, keeps no debug section already.

The suspension variant on emscripten. A program on emscripten that suspends, waiting inside a call for the browser's event loop, is built for one of two variants, the feature webcpp-suspend (the region suspend of tools/webcpp.jam):

feature.feature webcpp-suspend : jspi asyncify : propagated composite ;
feature.compose <webcpp-suspend>asyncify : <exception-handling-method>js ;

jspi, the default, is JavaScript Promise Integration: it builds with WebAssembly exceptions (-fwasm-exceptions), in the ordinary build directory. asyncify is Emscripten's Asyncify, for an engine without JSPI: a program built for it with WebAssembly exceptions traps, so the value composes <exception-handling-method>js, and b2's toolset then compiles and links with JavaScript-based exceptions (-fexceptions), in a directory of its own, webcpp-suspend-asyncify/. The feature is propagated, so that every library a program uses is built for its variant, and composite, since b2 takes only free features from usage requirements. A build asks for a variant with webcpp-suspend=asyncify on its command line, and a program with the requirement <webcpp-suspend>asyncify. The feature exists on every toolset, and natively, as on WASI, its default adds nothing. It chooses the exceptions and the directory only: the link flag that makes a program suspend, -sJSPI or -sASYNCIFY, is given by the program or by the library that suspends.

A test under node ends as its main ends. Every program that node runs, webcpp.run's, webcpp.run-fail's and webcpp.example's, links /webcpp//node-test, which tools/webcpp.jam adds on every target, so that no library's Jamfile can leave it out: its usage requirements give the header <webcpp/test/exit_status.hpp> (tools/node-test/include) everywhere, and on emscripten the pre-js tools/node-test/node-pre.js (--pre-js), which is also a dependency of the program, so that an edit of it rebuilds it, recompiled and relinked. The rules that only compile, webcpp.compile, webcpp.compile-fail and webcpp.compile-diagnostic, take it too, for the header: a test's main ends with webcpp::test::exit_status. Under node, a main that suspended and then returns loses its value under Asyncify, and node would exit 0; a main that never finishes would exit 0 on both variants; and std::exit sets the status without ending node, so that a later write replaces it, and anything pending keeps node running. Under the pre-js, a program ends with these statuses (measured with Emscripten 6.0.11 and node 26.7.0, the same source built without a variant, with -sJSPI and with -sASYNCIFY; the two rows of work still pending after the status with node 26.13.0, since node ends on its own):

main without suspension JSPI Asyncify
returns 3, no suspension 3 3 3
suspends, returns 0 (aborts: no suspension built) 0 1, with the line below
suspends, returns 3 (aborts) 3 1, with the line below
suspends, exit_status(4) (aborts) 4 4
suspends, std::exit(7) unmarked (aborts) 7 7
suspends, std::exit(0) unmarked (aborts) 0 1, with the line below
awaits a promise that nothing settles (aborts) 1 at once, with the line below 1 at once, with the line below
suspends, exit_status(3); later a callback gives exit_status(0) and a timer sets process.exitCode = 0 (both after 50 ms) (aborts) 3, once the pending 50 ms timers have run 3, once the pending 50 ms timers have run
suspends, exit_status(0) while a timer of 300 s is pending (aborts) 0 after 10 s 0 after 10 s
sleeps 600 s after bound(3s) (aborts) 1 after 3 s 1 after 3 s
never called (-sINVOKE_RUN=0), returns 0 1, with the line below 1, with the line below 1, with the line below
bound(0s), or a bound past 2147483 s (aborts) 1 at once, naming it 1 at once, naming it
returns 1, a timer sets process.exitCode = 0 later (trystero's tests) 0 0 0

The line, on standard error, is webcpp: main did not finish: it never ran, never returned, or ended after a suspension under Asyncify through a return or std::exit, which loses the status; end it with webcpp::test::exit_status: the pre-js replaces only a 0 that main never gave, since any other status is a failure already. It reads main as finished only when the glue called it (it wraps the glue's callMain), so that a program linked with -sINVOKE_RUN=0, whose main nothing calls, fails too. webcpp::test::exit_status gives its status to the pre-js, which ends node with the first status it is given, whatever runs later, and restores it over any later write of process.exitCode. Node ends on its own as soon as nothing holds it, and through process.exit only if something still holds it (a pending timer, a live worker) 10 s after the status. That is a workaround for node issue #64274: in node 26.13.0 process.exit can deadlock, when a background compile waits for a GC that the exiting main thread never runs (hash's async_heavy hung 5 times in 300 runs, 10 at a time), and a natural exit cannot. Under 10 to 36 runs at once on 18 cores, async_heavy ended on its own 0.2 ms to 5.4 s after its status, hence the 10 s. Two paths still end through process.exit and can meet the same deadlock: the 10 s fallback itself, for a test that holds node past its grace, and the bound below, for a test that runs past it; such a test can then hang until the CI job's timeout instead of failing at its bound. Both are rare and outside a test's normal end. Once the pinned node is a release with node PR #66171, which fixes it, the pre-js calls process.exit on node's next turn again, and both paths are safe again. It never calls std::exit, which in a debug build prints Emscripten's notice that the runtime is kept alive. A test is also bounded: past 120 s, the pre-js stops it with 1 and the line webcpp: the test ran past its bound of <n> s. 120 s is longer than any emscripten test of webcpp, and short enough that a test that waits forever fails inside the CI job instead of running to the job's own timeout. A test that needs longer calls webcpp::test::bound(std::chrono::seconds(<n>)), which re-arms the bound from that moment (natively it does nothing), and says why; a bound outside 1 to 2147483 s, which node's timers cannot hold, stops the test with 1 and the line webcpp: the bound of <n> s is outside 1 to 2147483 s. The watchdog is unref'd: it ends only a test that something else keeps alive. It bounds a test that waits, not one that spins inside WebAssembly, which no JavaScript timer interrupts. In a browser, which has no process, the pre-js does nothing, and a program of webcpp.link or webcpp.drive never links it. A program node runs may not link -sMODULARIZE or -sEXPORT_ES6, which wrap it in a factory that node never calls, so that it would pass having run nothing: webcpp.run, webcpp.run-fail and webcpp.example stop the build naming the flag, when their requirements or their Jamfile's give it, alone or among other flags of one value (a library's usage requirements are not read). The rule: a test or example whose main may suspend under Asyncify ends through webcpp::test::exit_status, never through return or std::exit, which returns its status on every target, and on emscripten first gives it to the pre-js, which ends node with it: return webcpp::test::exit_status(boost::report_errors());. tools/test/emscripten_test.py pins each case's exact status on the fixture library node_test_demo.

The Jamfile API (tools/webcpp.jam)

A library's test and example Jamfiles declare their programs only with these rules; the lint rejects b2's own run, run-fail, compile, compile-fail, exe, unit-test, link and link-fail there, by file and line.

import webcpp ;
webcpp.targets native wasip2 wasip3 ;
webcpp.run          <name> : <sources> + : <requirements> * : <targets> * ;
webcpp.run-fail     <name> : <sources> + : <requirements> * : <targets> * ;
webcpp.compile      <name> : <sources> + : <requirements> * : <targets> * ;
webcpp.compile-fail <name> : <sources> + : <requirements> * : <targets> * ;
webcpp.compile-diagnostic <name> : <sources> + : <requirements> * : <targets> * : alone ? ;
webcpp.boost-test   <name> : <sources> + : <requirements> * ;
webcpp.example      <source> : <requirements> * : <targets> * ;
webcpp.headers-alone <library> : <include-root> : <only> * : <requirements> * : <targets> * ;
webcpp.link         <name> : <sources> + : <requirements> * : <targets> * ;
webcpp.link-fail    <name> : <sources> + : <requirements> * : <targets> * ;
webcpp.data         <directory> + ;   (requirements)
webcpp.source-only <directory> + ;   (reference source trees)
Rule Passes when Notes
webcpp.targets t ... the Jamfile's default targets; before its first program, once; each is native, emscripten, wasip2 or wasip3, or the build stops naming it
webcpp.run the program exits with 0 built once per target it declares; a user's exception-handling=off links tools/throw_exception.cpp; on emscripten, run by node, linked with -sNODERAWFS=1, or with NODEFS, which the program mounts itself, under <webcpp-node-raw-fs>off; links /webcpp//node-test on every target (Targets, above)
webcpp.run-fail the program exits with another status built and run as webcpp.run's, and links /webcpp//node-test likewise
webcpp.compile the sources compile no program is linked; takes /webcpp//node-test for its header
webcpp.compile-fail the sources do not compile left out of clang-tidy; any error passes it, the wrong one included; takes /webcpp//node-test for its header
webcpp.link-fail the compiled sources fail to link use a matching successful control to distinguish the intended incompatibility from unrelated failures; the sources remain in clang-tidy
webcpp.compile-diagnostic the sources stop with every error they state in clang's -verify comments, // expected-error@<file>:* {{<message>}} for a header they include or // expected-error@+1 {{<message>}} for the next line compiled with -Xclang -verify -Xclang -verify-ignore-unexpected=error,note, so an error not stated and a note are ignored, the cascade that follows a header's #error among them; with alone last, with -verify-ignore-unexpected=note, so the stated errors are the compile's only ones and a refusal meant to be the first and only error fails its test when another error follows it; then tools/compile_diagnostic/check.py runs the compile again with clang's diagnostic log and fails on any error located in a comment (a // one or a /* */ one over several lines) after an expected-<kind> of that comment, which is -verify's own report on a directive it could not read and so dropped (a header it names that cannot be located, a {{...}} whose }} is not on its line), and on a compile that reports no error at all: each directive clang reads, every one outside a branch the preprocessor skips, must be read whole, the header it names found and included, and its error raised in that header; built on b2's clang toolset only (native clang, clang-wasip2, clang-wasip3) and skipped elsewhere, since -verify is clang's: a refusal would turn every gcc and msvc lane red for a declaration that holds; left out of clang-tidy; takes /webcpp//node-test for its header
webcpp.boost-test every case of the Boost.Test suite passes native only, whatever the Jamfile declares; the header-only framework, tools/boost_test_runner.cpp, is one object of the suite's, always compiled with exceptions
webcpp.source-only declares child source directories whose original Jamfiles are not WebCPP projects; use in build.jam before discovery; it changes neither explicit compilation nor lint
webcpp.example the program exits with 0, and its standard output, carriage returns removed, equals <stem>.expected beside it its standard input is <stem>.input beside it, else empty, never the terminal, on every target (wasmtime passes it through, and node under -sNODERAWFS=1, which <webcpp-node-raw-fs>off replaces with NODEFS); run through testing.launcher for WASI, and on emscripten with the node on PATH, not the one b2's toolset registered, which b2 gives only to its own testing rules, by tools/example/run_example.py, which names a failing exit status (or the signal) before the diff; always run again, and <stem>.input is a source of the run; links /webcpp//node-test on every target (Targets, above)
webcpp.link the program links never run: a program for a browser, which node refuses to run (-sENVIRONMENT=web), or one that needs the network; b2's link test, which --dump-tests lists and the report shows as a link test; never linked with -sNODERAWFS=1. The explicit target <name>-program is the same program, an exe of the same sources and requirements, <name>-program.js on emscripten, for a target that needs its files, such as a page that loads it. An example Jamfile's is shown on the page by its code, and has no .expected (chapter 3)
webcpp.headers-alone each public header compiles alone one test per header, alone-<path> with / as - (alone-xactor-scheduler), against /webcpp/<library>//<library> and the requirements given, for the targets given or the Jamfile's; only restricts a call to the public headers its globs match, relative to <include-root>/webcpp/ (wasi/http/response.hpp), a glob that matches none stopping the build; a library may call it several times, and a header two calls take stops the build, naming it
webcpp.data requirements, or usage requirements, that give a program of webcpp.run or webcpp.run-fail the absolute directories, each read at the same path on every target: on wasip2 and wasip3 wasmtime preopens it (wasmtime --dir="<directory>" <program>); natively and on emscripten (-sNODERAWFS=1) the program reads the host's files already. A relative directory stops the build, as does one whose path holds ", $ or a backquote, which the shell would read inside --dir="...", naming the character

A program a page loads, in both variants (tools/webcpp.jam). A page that runs a program which suspends loads the variant its browser supports: a test or example Jamfile declares the program once, with its manifest and the table of its sizes:

webcpp.variants   <name> : <sources> + : <requirements> * ;
webcpp.size-table <name> : <variants> + ;
Rule Builds Notes
webcpp.variants the explicit executable <name> and the explicit <name>.variants.json on emscripten alone (<build>no elsewhere), linked with -sMODULARIZE -sEXPORT_ES6, an ES module whose factory a page calls, and never with -sNODERAWFS=1: node never runs it, so it is no test, and neither counted on a page nor listed by declared-targets. The manifest, beside the jspi artifact, builds the program as <name>/<webcpp-suspend>jspi and <name>/<webcpp-suspend>asyncify and names, for each variant, its script relative to itself, with /, and the bytes of the .wasm beside it, in sorted keys and four spaces (tools/variants/variants.py manifest), which a page's loader reads. A build on emscripten that asks for JavaScript exceptions, webcpp-suspend=asyncify or exception-handling=on-js, is refused, naming the program: b2 cannot take an optional property back from a request, so the jspi variant would be linked with them and given as jspi's
webcpp.size-table the explicit <name>.sizes.md on emscripten alone; a Markdown table of the manifest of each <variants> program of the Jamfile, one row per program, sorted, with its jspi and asyncify sizes and their ratio, which the build also prints (tools/variants/variants.py table), and which the CI keeps from an own lane's job as the artifact sizes-<id> (CI, below)

A manifest, page.variants.json:

{
    "asyncify": {
        "bytes": 297636,
        "script": "webcpp-suspend-asyncify/page-60-d-asyncify.js"
    },
    "jspi": {
        "bytes": 102988,
        "script": "page-60-d-jspi.js"
    }
}

and its table:

| program | jspi | asyncify | asyncify / jspi |
| --- | ---: | ---: | ---: |
| page | 102,988 | 297,636 | 2.89 |

Such a program is named Boost's way, by the tag rule webcpp.suspend-tag, <tag>@webcpp%suspend-tag, which a library may also give its programs as a usage requirement: on emscripten an executable is named by common.format-name's tags joined by -, the toolset's version alone (60 for Emscripten 6.0.11), d for a debug build and the variant, so page-60-d-jspi.js, webcpp-suspend-asyncify/page-60-d-asyncify.js and, in a release build, page-60-jspi.js; every other target, and every other toolset, keeps its name. tools/test/emscripten_test.py pins the names, the manifest, the table and that a native build builds none of them, on the fixture browser_demo's test/variants/Jamfile:

import webcpp ;

webcpp.variants shell : shell.cpp ;
webcpp.size-table shell : shell ;

A webcpp.variants executable consumes its library usage requirements at its own link and exports none to downstream consumers. A driver can pass the explicit target reference .//shell to webcpp.drive, with <dependency>shell.variants.json, without linking the libraries' source objects again or combining the two suspension variants. The driver must not inherit the page program's library requirements; apply those to the page program itself.

WebAssembly components (tools/component/component.jam). A library's build.jam declares the C bindings of a world, and its test and example Jamfiles the HTTP components that wasmtime serves:

webcpp.wit-bindings <name> : <world-file> : <world> : <rename> : <version> : <wit-bindgen-argument> * ;
webcpp.serve        <source> : <requirements> * : <targets> * ;
webcpp.serve-script <name> : <script> : <stem> : <targets> * ;
Rule Passes when Notes
webcpp.wit-bindings the target <name>, the C bindings wit-bindgen generates for the world <world> of <world-file>, renamed <rename> (--rename-world), for the WASI version <version>, p2 or p3, with the arguments given: on that version's toolset alone (clang-wasip2, clang-wasip3) its usage requirements put their directory on the include path and link <rename>.c and <rename>_component_type.o, and elsewhere they add nothing, so a native build needs no wit-bindgen. The explicit target <name>-headers puts the directory on the include path on any toolset, for a native parse such as the reference (chapter 2). The bindings are generated while b2 computes a target's properties, in a dry run too, under <build-dir>/generated/<library>/<name>/, and again only when the world file, the WIT, wit-bindgen's version or an argument changed, compared by content. A name declared twice in a library stops the build, naming both
webcpp.serve the transcript of the answers to the requests of <stem>.requests equals <stem>.expected builds <source> as a reactor component that exports an HTTP handler, for its own targets, which may be only wasip2 and wasip3, else for those of its Jamfile that are, linking tools/throw_exception.cpp in a user's build without exceptions; tools/component/serve.py serves it with wasmtime serve (-S cli on wasip2, -S cli,p3 -W component-model-async on wasip3) on a port the system chooses, sends each request on a connection of its own, and stops wasmtime in every outcome, a SIGKILL of serve.py included, as b2 sends to an action that outlasts its -l: wasmtime runs under a keeper that kills it when serve.py's pipe to it ends. A test of b2's, which --dump-tests lists and --out-xml records, so the report sees it fail (as a run). It runs in an own lane, never in the ordinary ones (Lanes, below)
webcpp.serve-script as webcpp.serve, with the requests and the transcript of <stem> the component is built by the shell script <script>, run as sh <script> <p2|p3> <component> with WASI_SDK (wasi-sdk's directory, chapter 1), WIT_BINDGEN and WASI_WIT (the WIT of the lane's version) in its environment, the tools b2 found: a build by hand that a page shows, run as written. It runs at every build

<stem>.requests holds one request per line, <METHOD> <target>. The transcript holds, per request, the curl command that sends it after $ , which a shell runs as written (curl -I for HEAD, --request-target for a target that is not a path, such as the * of OPTIONS); the status line, HTTP/1.1 <status> <reason>; the response's headers in lower case, sorted, without the two wasmtime adds to every response, date and transfer-encoding; an empty line; and the body. An empty line separates two requests. The origin is written http://localhost:8080 whatever port was served, so one transcript holds on every machine and lane:

$ curl -i -X GET 'http://localhost:8080/a?b=c%20d'
HTTP/1.1 200 OK
content-type: text/plain; method=GET

GET /a?b=c%20d

Driven tests (tools/drive/drive.jam). A test that only a script can drive, such as one of a peer that a browser or another process meets, is declared in a test or example Jamfile that says first how a program of the original's language runs, with webcpp.original (CODING-GUIDELINES.md chapter 12), beside the package.json and package-lock.json that pin what the script needs:

webcpp.drive <name> : <sources> + : <requirements> * : <script> : <argument> * : <targets> * ;
Rule Passes when Notes
webcpp.drive <original words> <script> <arguments> <program> exits with 0 within its bound builds the program from the sources, for its own targets, else its Jamfile's, as webcpp.serve builds its component, and runs the script beside the Jamfile with the words of webcpp.original, the arguments and the path of the linked program: its JavaScript on emscripten, its native executable or WASI component on the other targets. A prebuilt executable is reused with its original object dependencies even when its producer also returns debug symbols or component metadata. tools/drive/drive.py runs it under the shared tools/component/process_tree.py keeper, bounded by 30 s, or the seconds the requirement <webcpp-drive-timeout> gives (<webcpp-drive-timeout>60). POSIX uses a process group; Windows assigns the keeper to a Job Object with kill-on-close before it starts the driver. Descendants inherit containment. A driver that has not ended by the bound, because it or its program hangs, is stopped with its descendants, and the test fails naming it, the program and the bound. The tree is stopped once the driver ends too, and when drive.py itself is killed, so that nothing the driver started outlives the test. Failure to establish containment fails the test before the driver starts. It depends on the Jamfile's node-modules, and a Jamfile without webcpp.original stops at it by name. b2's test DRIVE, which --dump-tests lists and --out-xml records, so the report sees it fail (as a run). Always run again. A lane-only program: it runs in an own lane, never in the ordinary ones (Lanes, below)

The fixture browser_demo's test/driver/Jamfile, whose drive.mjs runs the program, with node when it is JavaScript, and passes when it printed ready:

import webcpp ;

webcpp.targets native emscripten ;

webcpp.original node ;
webcpp.drive driven : driven.cpp : : drive.mjs : --program ;
webcpp.lane driver : driven : native emscripten ;

Libraries webcpp does not build (tools/webcpp.jam), until it builds them from third_party/ (CODING-GUIDELINES.md chapter 16). A library's build.jam declares each, and checks them, with three rules, which share one computation of each candidate:

webcpp.external <owner> : <library> : <variable> : <directory> : <header> : <target> ;
webcpp.external-found <owner> : <library> + : <properties> * ;
webcpp.left-out <owner> ;
Rule What it gives
webcpp.external declares that <owner>, a library of libs/, needs <library> on <target> (native or emscripten), found by its <header>, and returns the directory its lib targets search: -s<variable>=<dir> on b2's command line, the last one, a relative one made absolute against b2's working directory, never the environment; else .local/<directory> of the superproject when that holds include/<header>; else nothing, so that the compiler finds it on the system
webcpp.external-found for the <conditional> of the owner's target: nothing when each library it names, on the target's target, is there (the -s; else .local/<directory>; else, natively outside Windows, /usr/include or /usr/local/include, where a system install is legitimate); a -s that names a directory without the header stops the build, naming it; when no candidate holds it, <build>no, so that the owner's targets are skipped, and one line, once per owner and library, webcpp: <owner> is left out: <library> was not found: ..., naming every place it looked and how to give it, so that every other library builds; with webcpp-require-external=on (an incidental, propagated feature), as the CI and the lint build, the build stops instead, naming the owner and the library
webcpp.left-out why the owner's page is left out of a native build, <library> was not found, or nothing: the index's table then names the library with that reason and no link, so that it never links a page the build did not make

tools/test/external_test.py pins them: the command line, a relative one too, and .local/ found, the environment never read, a wrong -s refused, a missing library left out once while another library builds, the index's row without a link, and the stop under webcpp-require-external=on; tools/lint/lint_test.py that the lint's dry runs require the declared external dependencies and name any that are missing.

Generated files (tools/generated/generated.jam). A file that a script writes from inputs it pins, such as a table of Unicode data, is committed and written only by its generator. A library's test Jamfile declares it:

webcpp.generated <name> : <script> : <argument> * : <output> + ;
Rule Passes when Notes
webcpp.generated every output that <script> writes equals its committed <output>, byte for byte the explicit target generated-<name>: tools/generated/generated.py runs the Python script <script> in the Jamfile's directory as <script> <argument>... <path>..., each path where it writes one output, in the order given, under the Jamfile's build directory, and compares each with its committed file (tools/oracle/compare.py --files), naming every one that differs, with the command that writes it again, b2 libs/<name>/test//update-generated, every one that is missing and every one the generator did not write; it writes nothing into the tree, passing or failing. The first declaration of a Jamfile also declares the explicit target update-generated, which runs each of its generators the same way, in a build directory apart from the check's, so that one request may build both, and, once all have succeeded, copies their outputs beside the committed files and renames each over its own: a generator or a copy that fails leaves every committed file as it was, and a rename that fails is named with the files it replaced and those it left. Paths are relative to the Jamfile; a script that is not a .py file or does not exist, a name declared twice, and an output named twice, by one generator or by two of the Jamfile, stop the build. An own lane names the check, webcpp.lane <lane> : generated-<name> ;, which runs natively, as an oracle's does, and is of the kind programs, since a generator runs Python, not the original's language; the ordinary lanes never build it, since a generator may need the network. Neither target compiles anything, so they need no Boost: they leave out the Jamroot's check of Boost, and the libraries their project's requirements name, whose targets would run it

A library named and not called (tools/same_program/same_program.jam). A library that a program names and never calls adds no byte to it (CODING-GUIDELINES.md chapter 5, rule 11). A test Jamfile declares the proof:

webcpp.same-program <name> : <sources> + : <library> : <targets> * : <requirements> * ;
Rule Passes when Notes
webcpp.same-program <sources> built with <library> and without it, as two programs of b2 under the one output name <name>, give byte-identical files (on emscripten the .js and the .wasm beside it) a test of type SAME_PROGRAM, listed by --dump-tests and recorded by --out-xml; <requirements> are properties given to both programs (<library>/webcpp/crypto//crypto), <targets> as for any program. The pair is built in two directories of its own (<name>_with, <name>_without), release, without debug information, with /Brepro on MSVC, with the library linked as an archive whatever its own request (<link>static), with the handler of a build without exceptions as every program has it, and with the same link flags, the linker's removal of unused sections (-Wl,--gc-sections, -Wl,-dead_strip, /OPT:REF) included, so that a C library's usage requirement is not what differs: only <library> does. It fails naming both files with their sizes. Nothing runs b2 inside b2

The rules of the doc Jamfiles are in chapter 3: webcpp.doc <library> : <page>.adoc ;, webcpp.reference <library> : <requirements> * : <also-checked> * ; (chapter 2) and, for the superproject's index, webcpp.index <page>.adoc ;. Those of an oracle's Jamfile, libs/<name>/test/oracle/Jamfile, are in CODING-GUIDELINES.md chapter 12: webcpp.original, webcpp.twins, webcpp.cases and webcpp.lane, which any test or example Jamfile of a library may also declare, with the targets its lane runs on (Lanes, below).

A library's Jamfiles, as xactor's, each whole after its licence notice. libs/xactor/test/Jamfile:

project : requirements <library>/webcpp/xactor//xactor ;

import webcpp ;

webcpp.targets native wasip2 wasip3 ;

webcpp.headers-alone xactor : ../include ;

# xactor's guarantees, one program per file. scheduler checks the Asio
# driver where drivers.hpp declares it, outside WASI.
webcpp.run scheduler : scheduler_test.cpp ;
webcpp.run lifecycle : lifecycle_test.cpp ;
webcpp.run fuel : fuel_test.cpp ;
webcpp.run create_actor : create_actor_test.cpp ;

libs/xactor/example/Jamfile:

project : requirements <library>/webcpp/xactor//xactor ;

import webcpp ;

webcpp.targets native wasip2 wasip3 ;

webcpp.example xactor_quick_start.cpp ;
webcpp.example xactor_lifecycle.cpp ;
webcpp.example xactor_fuel.cpp ;
webcpp.example xactor_timers.cpp ;
webcpp.example xactor_drivers.cpp ;
# A test of actors, with lightweight_test: it prints nothing on its standard
# output, and returns boost::report_errors().
webcpp.example xactor_testing.cpp ;
# A static actor, whose behaviour is a Boost.MSM state machine.
webcpp.example xactor_msm.cpp ;
# Native only: xactor's Asio driver has not adopted webcpp::asio's checked
# WASIp3 integration. That separate adaptation is not implied by Asio's
# WASIp3 support.
webcpp.example xactor_asio.cpp : : native ;

Tests

How a test is written, its framework, its checks and the targets it runs on, is CODING-GUIDELINES.md chapter 8.

Lanes

A lane builds and runs one library's tests and examples for one toolset, from scratch, and records what it built and ran:

b2 -a --dump-tests --out-xml=<lane>.xml toolset=<toolset> libs/<library>/test libs/<library>/example

A wasip2 lane adds testing.launcher=tools/boost/asio-wasip2/run.sh; a wasip3 lane adds testing.launcher=tools/boost/asio-wasip3/run.sh. Both global test launchers grant inherited network and IP name lookup and default to 600 seconds per process, including the large finite parsing workloads. WASIp3 also enables component async/threading support. WEBCPP_WASIP2_TEST_TIMEOUT and WEBCPP_WASIP3_TEST_TIMEOUT override their finite bounds with positive integers. These are test-harness settings, not production permissions or a guarantee that tests never contact an external host. Both launchers apply to every toolset of one b2 request, so a lane is always one toolset. An emscripten lane adds nothing: b2's toolset runs its programs with node. The lane runs from the superproject's root. --dump-tests is required: it lists every test, those the lane skips included, and the report refuses a file without it. With --out-xml, b2 exits 0 even when a test fails, so b2's status is never the verdict.

Lane names. A lane is named after its target (native, emscripten, wasip2, wasip3) or after the directory b2 builds its toolset in (gcc-14, gcc-15, clang-linux-18, clang-darwin-21, msvc-14.3). The CI names a native lane after its directory, and a wasm or emscripten lane after its target. An own lane on a target (below) is named <target>.<library>.<lane>, whichever directories declare it: wasip2.wasi.http. No toolset directory begins with a target and a dot, so that name is never a lane's, and its column stands beside the target's own. The report checks every name against the toolset directory the file records: a lane named after a target must be built for it, an own lane must be built for the target its name begins with and list the tests of the library it names alone, and any other name must be that directory, or the report exits 2, naming the lane, the directory and the names it may take. A lane that built nothing records no directory; its name is checked against the toolset its command line names when it begins with a target, and it fails as empty.

Lanes in parallel. Independent lanes run at the same time, each with its own build directory, and are read once all have finished:

b2 -a --dump-tests --build-dir=bin/lane-wasip2 --out-xml=wasip2.xml toolset=clang-wasip2 testing.launcher=wasmtime libs/<library>/test libs/<library>/example

Two concurrent b2 runs never share a build directory, and at most one of them builds the documentation (chapter 3).

Own lanes. A library may also declare lanes of its own with webcpp.lane (CODING-GUIDELINES.md chapter 12). What a lane names leaves the library's ordinary lanes, which build only its test and example directories' other programs. b2 declared-lanes -d0 lists them, one line each, which ends with the lane's kind: original when one of the targets it names runs the original's language, the twins, cases, node-modules or update-expected of an oracle's rules (CODING-GUIDELINES.md chapter 12) or a driven test (webcpp.drive), whose CI job then installs Node, and programs when it runs only what its toolset builds, such as wasi's served components, whose job installs no Node of its own. A lane's kind is computed once every Jamfile is loaded, so a lane may name a target its Jamfile declares after it, and it reads only the names the lane gives itself: a lane over an alias of the oracle's targets is of the kind programs, so a lane names them directly.

  • An own lane that names no target, such as xstate's oracle lane, which needs Node where a toolset lane does not, is the line <library> <lane> <directory> <kind>, and runs as b2 -a <directory>//<lane>, whose exit status is its verdict. It writes no XML, and is no column of the report.

  • An own lane that names targets is the line <library> <lane> <directory> <target> <kind> once per target, and runs on each as that target's lane runs, from scratch, with --dump-tests and --out-xml, in every directory of the library that declares a lane of that name on that target, in one b2 run: its tests reach the report, in a column of its own (above). wasi's served tests and served examples, the components wasmtime serves (webcpp.serve, webcpp.serve-script), are its lanes http, in test/ and in example/, on wasip2 and wasip3, run as one own lane on each:

    webcpp.lane http
      : http_methods http_long_body http_no_content_type http_two_units
      : wasip2 wasip3 ;
    
    b2 -a --dump-tests --out-xml=wasip2.wasi.http.xml toolset=clang-wasip2 testing.launcher=wasmtime libs/wasi/example//http libs/wasi/test//http
    

    Built for a target it does not name, natively for one, such a lane stops, naming itself, its targets and the toolset to give (webcpp.lane http in libs/wasi/test/Jamfile runs on wasip2 wasip3, and this build is for native: give toolset=clang-wasip2 or toolset=clang-wasip3, with testing.launcher=wasmtime), rather than build nothing and read green.

    A lane-only program, served (webcpp.serve, webcpp.serve-script) or driven (webcpp.drive), always runs so: b2 declared-lanes stops, naming it, when no lane of its Jamfile names it (webcpp.drive driven in libs/browser_demo/test/driver/Jamfile is in no own lane; name it in a webcpp.lane that names its targets), or when its lanes leave out a target it is built for, so the CI's plan fails before any job runs rather than leave it untested.

    crypto's lane c-suites runs the C libraries' own test programs (BearSSL's, ctaes's and libsecp256k1's) on webcpp's build of them, on native, wasip2, wasip3 and emscripten, ids <target>.crypto.c-suites:

    b2 -a --dump-tests --out-xml=wasip2.crypto.c-suites.xml toolset=clang-wasip2 testing.launcher=tools/boost/asio-wasip2/run.sh libs/crypto/test/c_suites//c-suites
    

    A lane on emscripten is declared like any other, and runs as the emscripten lane runs, toolset=emscripten with no launcher, never natively in its place: browser_demo's driven test is its lane driver, on native and emscripten, emscripten.browser_demo.driver there.

The report (tools/report/)

python3 tools/report/report.py --lane <lane>=<lane>.xml [--lane ...] --out <dir>

writes the test matrix into <dir>: index.html, the libraries by lanes; <library>.html, a library's tests and examples by lanes; and output/<lane>/..., the log of each failure, linked from its cell. A cell is green when every build of it passed, red with the kind of its most significant failure (compile, compiled, link, linked, build, run, ran, not run), and grey (n/a) when the lane did not build it. The directory is served as the site's report/ (below): each page's webcpp links the site's index, ../, a library's page links its documentation, ../libs/<library>/, and the footer links github.com/webcpporg.

Its exit status is the verdict: 0 when every lane built something (a test or an example: an example counts as something that ran) of every library it lists, and everything passed; 1 when a test or an example failed, an action outside every test failed, a lane built nothing, or a lane that built something built none of the tests and examples of a library it lists, each named (wasip2: nativeonly: the lane built none of its tests and examples). The CI puts in a lane only the libraries that declare its target, so such a library is a fault that a grey column would hide, as when a lane run by hand names a library that does not declare its target. It exits 2, with nothing written, when a file cannot be read, a lane spans more than one toolset, a lane named after a target was built for another, a lane named after no target is not named after its toolset directory, a test lies outside libs/<name>/, or a library is named index.

The site (tools/site/, site/)

b2 site
b2 site -sWEBCPP_SITE=release -sWEBCPP_SITE_VERSION=<version>
b2 site-serve

builds webcpp's whole site into bin/site/: the site's own pages, the index page and every library's page, the report, and the files that index them, every link checked and every page valid HTML. b2 site-serve builds it and serves it at http://127.0.0.1:8765/. The site is built for one of two channels:

Channel Built with Served at Indexed
preview b2 site, the default https://webcpporg.github.io/, from every push to main no: it is the development version, and every page carries <meta name="robots" content="noindex">; it writes no sitemap.xml, which its robots.txt does not name
release -sWEBCPP_SITE=release -sWEBCPP_SITE_VERSION=<version> https://webcpp.org/, from a release tag yes: every page says index, follow, and robots.txt names sitemap.xml

A preview page's band names the commit it was built from and its date, a release page's the version. The options:

  • -sWEBCPP_SITE=<channel>, preview or release; any other value stops the build, named. The release needs -sWEBCPP_SITE_VERSION=<version>, such as 1.0.0 or 1.0.0-rc.1, and the preview takes none.
  • -sWEBCPP_SITE_DOCS=<dir> names the pages b2 doc -sWEBCPP_INDEX=site built already, a superproject's root or a copy of its doc/html and libs/<name>/doc/html, as the CI's docs job hands them on; without it, b2 site builds them with b2 doc.
  • -sWEBCPP_SITE_REPORT=<dir> names what tools/report/report.py wrote; without it, report/ says that no results were given, as on any machine but the CI's.

The steps, each one of the site's npm scripts or a script of tools/: tools/site/catalogue.py writes the catalogue, bin/libraries.json, from every library's meta/libraries.json and the targets it declares; the site's build script renders its pages with the channel, the commit, its date, the version and the catalogue (/webcpp/site//pages); tools/ci/assemble.py lays them out with the docs and the report into bin/site.tmp/, heading each page of the docs and of the libraries with the site's header, each library's page with the head the catalogue gives it, and every page with noindex on the preview, then checks that every page carries the robots of its channel; the build script writes the indexing files (site/tools/indexing.mjs); assemble.py --check checks every link; the build moves into bin/site.builds/, and bin/site, a link, is renamed onto it in one step (the swap script), so that a server on bin/site reads one build or the other whole and a failed step leaves the last good build; last, /webcpp/site//valid-html runs html-validate over every page. bin/site/:

index.html          the home, from the site's pages/index.oui
libraries/, cpp/, javascript/, ai/, examples/, community/, search/
                    the site's other pages, each from its pages/<name>.oui
assets/             the styles, the logo, the icons and the client bundle, site.js
cards/              each page's and each library's social card, 1200 by 630
favicon.ico
docs/               the index page, built with -sWEBCPP_INDEX=site
libs/<name>/        each library's page
report/             the test matrix
robots.txt          every crawler allowed; on the release, the sitemap named
sitemap.xml         on the release alone: every page, with the date its source last changed
llms.txt            what webcpp is, and a line for each library and each page
libraries.json      the catalogue

Where the site's source lives. The site is a repository of its own, webcpporg/webcpporg.github.io, checked out as the submodule site/, as a library is under libs/: its pages in OpenUI Lang under pages/, the React components they are written with and the renderer under src/, its node tools under tools/, its tests under test/, its Jamfile, and its own AGENTS.md and README.md. A change to it is committed in site/ on its main, then the superproject commits the submodule's new commit, as for a library. What the superproject holds of the site is tools/site/ and tools/ci/assemble.py. Its tests are b2 /webcpp/site//test, the site's own (its npm test and typecheck), and tools/site/*_test.py with tools/ci/assemble_test.py, among the tools' tests.

CI

The CI runs exactly the commands above. It is GitHub Actions, in two workflows of the superproject, and every third-party action is pinned by its full commit SHA, with its tag in a comment. It runs on every push to main and on every pull request, of the superproject and of each library.

A library's CI, libs/<name>/.github/workflows/ci.yml, calls the superproject's reusable workflow, .github/workflows/library.yml@main (on: workflow_call, input library). The superproject's CI, .github/workflows/ci.yml, calls the same workflow without a library, for every library at the commit its submodule points to. Every job checks out webcpporg/webcpp with its submodules, the caller's commit for the superproject and main for a library, whose own commit then replaces libs/<library>; no checkout keeps its credentials. A run on main is never cancelled by the next; a pull request's newer push cancels its older run. The jobs:

  • plan: python3 tools/ci/matrix.py plan [--library <name>] runs b2 declared-targets -d0 and prints the JSON matrix of lanes: one lane per compiler for each target a library declares, building the libraries that declare it. The CI never lists a library's targets by hand. Every target has a lane, and one that comes to have none fails the plan by name. Then matrix.py own-lanes [--library <name>] runs b2 declared-lanes -d0 and prints the JSON matrix of the own lanes of that library, or of every library, one entry per library, lane and target: {library, lane, directories}, every directory that declares the lane there, for an own lane that names no target, and one per target for one that names targets, which adds platform, its target, and id, its name in the report; every entry has kind, the lines' (original when any of its directories' lanes runs the original), name, its job's, the os, wasm, emsdk, cc and cxx of the lane whose setup it shares, the target's own, and the oracle's Clang 18 for native and for none, node, true for a lane of the kind original and for one on emscripten, whose lane has Node, and external, as a lane's (below), which the job reads from it alone. Last, matrix.py declares emscripten [--library <name>] prints true when any library of the superproject declares emscripten, whatever library the CI runs for, else false: the plan's output has-emscripten, on which the docs and lint jobs install emsdk (the lint analyses every library, and a page builds the page of each library it links, with its reference). And matrix.py external --library <name> prints true when that library needs libraries webcpp does not build: it is in EXTERNAL_DEPENDENCIES (below), or a library of libs/ that its build.jam or Jamfiles use (/webcpp/<name>), at any depth, is; else false: the plan's output external, on which the docs job installs them, since a page parses its library's headers and those it uses. Without --library it says whether any library of libs/ needs them: the plan's output lint-external, on which the lint job, which analyses every library, installs them.

  • lanes, one job each, which run matrix.py lane <entry>: it registers the lane's toolset in .local/user-config.jam with its version, prints the lane command and runs it, and the job uploads <lane>.xml:

    Lane Runner Toolset
    gcc-14 ubuntu-24.04 gcc-14, in a container with no network
    gcc-15 ubuntu-26.04 gcc-15
    clang-linux-18 ubuntu-24.04 clang-18, on libstdc++, in a container with no network
    clang-linux-22 ubuntu-26.04 clang-22, on libstdc++
    clang-darwin-<version> macos-15 Apple Clang, its version read from clang++ -dumpversion
    msvc-14.3 windows-2022 Visual Studio 2022
    msvc-14.5 windows-2025 Visual Studio 2026
    emscripten ubuntu-24.04 emscripten: Emscripten 6.0.11 from emsdk, its system libraries built in the cache the action restores, and Node 26.7.0 through the wrapper of the emsdk action (its entry's node)
    wasip2, wasip3 ubuntu-24.04 clang-wasip2, clang-wasip3: wasi-sdk 34, wasmtime 50.0.1, wit-bindgen 0.62.0 and the WASI WIT, for every library

    The Clang lanes on libstdc++ stay: a regression of xactor's guarantee 28 is caught only there. The MSVC lanes add address-model=64 embed-manifest-via=linker --abbreviate-paths; b2 abbreviates each word of a toolset directory, and msvc-14.3 and msvc-14.5 are their own abbreviations, which tools/ci/matrix_test.py checks with b2's own rule. On both, crypto's message cases, libs/crypto/test/msvc, prove that each wrong build stops (webcpp.compile-fail at compile time, webcpp.link-fail at link time); their exact text is checked on clang, GNU ld and wasm-ld only (CODING-GUIDELINES.md chapter 19). Both Windows jobs run python tools/drive/drive_test.py before compiling, including real Job Object nesting, timeout, orphaned descendants and owner termination. The Linux tools shards continue to check POSIX process groups.

    The WASIp3 lane uses tools/boost/asio-wasip3/run.sh, which grants network and name lookup for the loopback tests and enables the pinned runtime component features. WASIp2 retains the plain wasmtime launcher.

    The container lanes, gcc-14 and clang-linux-18 (their entries' container), run the lane's b2 in a Linux container with no network but the loopback, so that a test that reaches beyond the machine fails there: every library's tests hold it, and trystero's guarantee 6 rests on it. The image is tools/ci/container/Dockerfile's: Ubuntu 24.04, the runner's release, pinned by the digest of its image index, with g++-14, clang-18, libclang-rt-18-dev (Clang 18's sanitizer/ headers, which secure's declassify_compile_msan includes), Python, Git, Make, Perl and CMake, every package, ca-certificates included, from Ubuntu's snapshot of the archive at the date its ARG SNAPSHOT names (Snapshot: yes on the sources, apt-get --snapshot), so that one Dockerfile is one set of packages. The snapshot service is HTTPS only and the base image has no CA certificates, so apt reaches it once without verifying the server's certificate, to install ca-certificates from the snapshot, and verifies it from then on; apt checks the signed InRelease and every index and package against it whatever the transport. Mixing a live ca-certificates package with snapshot dependencies previously produced incompatible OpenSSL package versions; the image keeps all packages on the same snapshot. Consumer OpenSSL is now built from the pinned sources. Ubuntu keeps no snapshot of ports.ubuntu.com, so the image builds for x86-64 alone (measured: apt 2.8.3 refuses arm64's sources). tools/ci/environments.json pins the public GHCR image by its full digest and binds it to the Dockerfile recipe. The container action pulls that digest; a missing or stale pin fails with preparation instructions. It never runs apt or builds an image during an ordinary lane. Every lane depends only on the plan, so an unavailable image blocks its two consumers while the other configurations continue. Then it runs b2 by its path, docker run --rm --network none, as the runner's user, with the superproject and b2's prefix, where the Boost action installs Boost's headers too, mounted at their own paths, and the variables of the external libraries, when a library has any, passed on; the XML is the lane's, as outside a container. A lane run so needs Linux x86-64 and docker.

    External libraries. EXTERNAL_DEPENDENCIES in tools/ci/matrix.py is empty and EXTERNAL_VARIABLES is (): webcpp builds every library it needs (libsecp256k1 as /third_party//secp256k1), so matrix.py external prints false. The machinery stays for a later library: a lane that needs one has external in its entry, including own lanes, its job would run the action of its name, tools/ci/actions/<name>, after toolchain setup, and B2 would receive webcpp-require-external=on and a -s<VARIABLE>=<dir> argument for each of EXTERNAL_VARIABLES the action exported. libsecp256k1, OpenSSL and libdatachannel have no provisioning actions: their pinned source targets build in the consumer's B2 variant, including inside container lanes. A container lane passes no variable of the environment into its container.

  • own lanes, one job per entry, named and placed as the entry says (name, os), which runs matrix.py own-lane <entry>: it registers the lane's toolset, prints its b2 command and runs it, on the lane in each of its directories. A library that declares no own lane, as xactor, has no such job.

    • One that names no target, Own lane (<library>, <lane>), on Linux x86-64 (ubuntu-24.04): the Boost action, the Node action, and b2 -a toolset=clang-18 <directory>//<lane> ... (an oracle lane checks Boost, CODING-GUIDELINES.md chapter 12), whose exit status is the lane's verdict.
    • One that names a target, Own lane (<library>, <lane>, <target>), on its entry's image: the Boost action and what the target's lane installs, the same steps by their YAML anchors (&wasi-sdk, &wasmtime, &wit-bindgen, &wasi-wit, &emsdk), so that a step added to a WASI or emscripten lane is added to it too, and the Node action; then b2 -a --dump-tests --out-xml=<id>.xml toolset=<toolset> [<options>] <directory>//<lane> ..., and it uploads <id>.xml as a lane uploads its XML, the artifact lane-<id>.
    • Every own lane's job uploads the size tables its lane wrote (bin/**/*.sizes.md, webcpp.size-table), whatever its outcome, as the artifact sizes-<id>, or sizes-<name> for one that names no target, so that the sizes of a page program's variants are kept beyond the job; a lane that wrote none uploads nothing.
    • An own lane of the kind original has the CI's Node, its entry's node (&node): an oracle runs npm and its original with it, and a driven test its driver, natively too. Without it, a native one would run with the image's own Node, another version. One on emscripten has it as the emscripten lane does, which runs its programs with it; one of the kind programs on any other target, such as wasi's served lanes, has none.
    • An own lane whose driver meets a browser, one of CHROME_LANES in tools/ci/matrix.py (trystero's interop, natively and on emscripten, webrtc's interop, whose page meets Chrome on emscripten while its native run is two native peers, though CHROME_LANES names a lane on every target, document's js, webrtc's browser, and the browser lanes of asio, beast and cobalt), has its entry's chrome, and its job runs the chrome action, which gives it CHROME, a pinned Chrome rather than the image's, which moves with the image, so that a red interop lane is never a browser nobody chose.
  • docs: with MrDocs on Linux x86-64 (it has no build for Linux arm64 or Intel macOS), clang++-18, Node, wit-bindgen and the WASI WIT (wasi's reference parses its bindings), b2 -a libs/<library>/doc, or for the superproject b2 -a doc -sWEBCPP_INDEX=site, whose pages are the site's, and, when the plan's has-emscripten is true, emsdk in .local/emsdk, with the sysroot in its cache and without its system libraries (libraries: 'false'), whose em++ and clang++ read for Emscripten's target the reference of a library with a header built for emscripten alone (/webcpp//emscripten-reference, chapter 2); and, when the plan's external is true, the external libraries, built with Clang 18, whose headers the reference of the library, or of a library it uses, parses (none today).

  • lint: tools/lint/lint.sh in twelve shards (--shard 1/12 to 12/12), with wasi-sdk's clang-format and clang-tidy, Node, Clang 18 as b2's default toolset and the wasip2 and wasip3 toolsets after it (matrix.py register clang-18 wasip2 wasip3), wit-bindgen and the WASI WIT, which the WASI dry runs of the compilation database need; when the plan's has-emscripten is true, the emscripten toolset after them and emsdk, without its system libraries (libraries: 'false'), whose em++ the emscripten dry run names and whose cache holds the sysroot an emscripten command is analysed with; when the plan's lint-external is true (none today), the external libraries, built with Clang 18; and the full history (fetch-depth: 0) of the superproject and of the library, since the banned-word rule reads every commit.

  • tools, for the superproject only: every tools/**/*_test.py, in eight shards, with Clang 18 and the wasip2, wasip3 and emscripten toolsets, wasi-sdk, wasmtime, wit-bindgen, the WASI WIT, emsdk, Node and MrDocs, each failure named; the tests of the emscripten target share the cache the emsdk action restores (chapter 1). A suite run by harness.run_cases runs its slice of cases in every shard (--shard K/N, which a run by hand takes too); every other suite runs whole in one shard, in turn. A run without --shard that chooses no case fails, since it would pass having run nothing.

  • actionlint: actionlint 1.7.12, downloaded and checked against its SHA-256, on every workflow of the superproject and of libs/*, with .github/actionlint.yaml. It also runs clean locally before a workflow change is committed.

  • report: matrix.py report --plan <matrix> --own-lanes <matrix> merges the XML of every lane and of every own lane on a target with tools/report/report.py into the test matrix, uploaded as an artifact. Its exit status is the verdict; a planned lane or own lane on a target that wrote no XML fails it by name, and so does a lane's job that failed, or an own lane's.

matrix.py lane and matrix.py own-lane take, after --, more arguments for b2, so that a lane is run locally exactly as the CI runs it, beside others: python3 tools/ci/matrix.py lane '<entry>' -- --build-dir=bin/lane-gcc-15. Each registers the lane's toolset in .local/user-config.jam, wasi-sdk's directory, the emsdk's and the node wrapper each quoted as one word of Jam.

The actions, tools/ci/actions/, each a script beside its action.yml:

  • boost downloads boost_1_92_0.tar.gz from https://archives.boost.io/release/1.92.0/source/, checked against the SHA-256 it records: the gzip archive, since Windows Server 2022's tar.exe has no bzip2. It builds b2 with bootstrap, and installs Boost's headers (--with-headers) and that b2 into a prefix cached per image. It keeps beside them, in <prefix>/source, the archive's boost/version.hpp, every libs/<library>/src and the marker .webcpp-boost-source (chapter 1). It writes the using boost line of .local/user-config.jam, with the modules.poke : BOOST_SOURCE that names <prefix>/source, and puts b2 on PATH, on Linux, macOS and Windows. The headers are installed with --layout=system, in <prefix>/include/boost, and b2 with b2-install-layout=standard, in <prefix>/bin: on Windows, Boost's default is the versioned layout, <prefix>/include/boost-1_92, and b2's the portable one, which ignores --bindir and puts b2 in the prefix itself. A prefix that lacks the headers, b2 or the sources after the install fails the action before it is cached. It refuses an empty or relative prefix: b2 given an empty --prefix installs into /usr/local. install.sh source <dir> fills such a tree alone, for a machine whose Boost comes from elsewhere. Every tree it extracts gets the patches of tools/ci/actions/boost/patches first, with git apply (CODING-GUIDELINES.md chapter 14, the build): one that does not apply, or that the archive holds already, fails the action naming it, the patches are part of the cache key, and a prefix whose headers lack one is refused.

  • wasi-sdk installs wasi-sdk 34 into .local/wasi-sdk: the runner's build of its clang and tools, with the release's platform-independent wasi-sysroot-34.0 and libclang_rt-34.0 in place of that build's sysroot and compiler-rt builtins, each archive pinned by its SHA-256. A per-host build's own sysroot carries __FILE__ strings with the paths of the machine that built it, so a WASI program would differ by host; with the shared sysroot it is the same bytes on every host. Its install.sh also installs wasi-sdk locally, from the superproject's root, for the machine's own system and processor. wasmtime installs wasmtime 50.0.1 on PATH, mrdocs installs MrDocs 2026.9.29 into .local/mrdocs, and node sets up Node 26.7.0, with npm's cache keyed on the lock files of tools/doc, tools/lint, every library's test/oracle and the site's, site/.

  • wit-bindgen installs wit-bindgen 0.62.0, the release's archive for the runner's system and processor (Linux and macOS, x86-64 and arm64), the program alone, into .local/wit-bindgen; wasi-wit installs the wit/deps directories of the crates wasip2 1.0.4 and wasip3 0.9.0, from https://static.crates.io/crates/, into .local/wasi-wit/p2 and .local/wasi-wit/p3. Both install where the build looks when no -s is given (chapter 1), so a job's b2 commands name neither, and each replaces what an earlier install left.

  • emsdk installs Emscripten 6.0.11 into .local/emsdk, on Linux and macOS, x86-64 and arm64: the emsdk repository at the commit of its tag 6.0.11, fetched by its hash with git, the commit being the pin (the install fails unless HEAD is it, and keeps no .git), and every archive emsdk install 6.0.11 installs from (the release's binaries, Node 24.19.0 and, on macOS, Python 3.13.3), each downloaded first and checked against the SHA-256 it records, since emsdk checks none: emsdk runs with EMSDK_KEEP_DOWNLOADS=1, under which it installs from the files it finds in its downloads/, and one it downloads besides them fails the action, naming it, before emsdk activate, which on macOS runs the Python the install unpacked. A release whose binaries hold no install/emscripten/node_modules fails before emsdk runs, since emsdk would install them with npm ci from the registry. It checks that emcc --version names 6.0.11 (a0014542110d6078c3a1a7941fa1ddb3a2281f16), else fails naming both; installs tools/ci/actions/emsdk/node.sh as .local/emscripten/node, the node that the toolset runs a program with, which refuses --experimental-wasm-threads without a word (b2 1.92's emscripten toolset probes Node with that flag, which Node 24 and newer refuse with an error on standard error, in every b2's output); gives the later steps EM_CACHE, .local/emscripten-cache by its resolved path, outside the emsdk (chapter 1); and warms that cache: Emscripten checks its configuration the first time it meets a cache and says "Running sanity checks" on standard error, so the action runs emcc --version once, where the log is its own, and fails unless em++ --version then says nothing more. On a cache miss, it then builds with embuilder the system libraries the lanes link, the list install.sh records, measured from what a fresh cache builds for a C++ program linked at -O2 and -O0 -g, with and without -fwasm-exceptions: libc, libc++ and libc++abi in their debug, exception and noexcept variants, compiler-rt, dlmalloc, the unwinder and the default stubs. A variant not listed is still built when a link needs it. The emsdk and that cache are cached together, keyed on the version, the runner and the action's files, so a change to the list builds a new entry. A job that only parses Emscripten's headers, the docs and the lint, gives the input libraries: 'false': under the same key it restores the cache the lanes save, its libraries built, and on a miss it writes the sysroot alone (embuilder build sysroot) and saves nothing, since a lane that restored that cache would build every library again. A warmed cache, rather than EMCC_SKIP_SANITY_CHECK=1 as the tests of the build set: the check still runs, once, and again when the version or the emsdk's directory changes. The toolset's lines are the regions emsdk and emscripten of tools/ci/emsdk.jam, which matrix.py register emscripten writes with .local/emsdk in place of /path/to/emsdk and $(emsdk), and .local/emscripten/node in place of /path/to/node and $(node), and which a page includes as wasi's does those of wasi-sdk.jam (chapter 3):

    local emsdk = /path/to/emsdk ;
    local node = /path/to/node ;
    using emscripten : : $(emsdk)/upstream/emscripten/em++ : <nodejs>$(node) ;
    
  • There is no action for libsecp256k1, OpenSSL or libdatachannel: B2 builds them from source (libsecp256k1 as /third_party//secp256k1). The last one's static datachannel, juice, usrsctp and srtp2 archives stay separate; it never bundles another OpenSSL archive into them. Its CMake recipe uses the exact OpenSSL headers and archive bytes selected by the B2 dependency.

  • chrome installs Chrome for Testing's chrome-headless-shell 155.0.8059.39, the Stable channel of Google's last-known-good-versions-with-downloads.json when it was pinned, from the URL that JSON lists, checked against the SHA-256 recorded for each build (Google publishes none: each is the digest of the archive downloaded twice, which matched the MD5 Google's storage states for it), into .local/chrome-headless-shell, on Linux x86-64 and arm64, and exports CHROME, a wrapper that runs it with --no-sandbox, a decision kept until it is measured on a runner: its sandbox needs unprivileged user namespaces, which Ubuntu 24.04 grants through AppArmor only to programs with a profile, and its archive has no setuid chrome-sandbox (in an Ubuntu 24.04 container under Docker, as an unprivileged user, it stops with "No usable sandbox!" without the flag, the symptom, though Docker refuses those namespaces for a reason of its own). The threat model: a sandbox confines a renderer against a hostile page, and the shell loads only the interop driver's own pages, on 127.0.0.1, with every other host unresolvable (the driver's --host-resolver-rules). The options that keep the sandbox, to measure after the first CI run, are an AppArmor profile granting userns to this shell alone, and CHROME_DEVEL_SANDBOX naming the image's setuid helper, /opt/google/chrome/chrome-sandbox. The headless shell sends nothing to Google of its own (measured). Beast and Cobalt browser lanes select product: chrome at the same pinned version, installed into .local/chrome. Their certificate tests need full Chrome's isolated profile trust store. Test CAs are installed only in disposable profiles; no host trust store or certificate-validation bypass is used. The drivers disable background networking and operate against local fixtures.

  • container gives a job the checked immutable image above. Registry access happens before the lane; the test container still has --network none.

  • tool-archives restores the SHA-256 addressed archives for wasi-sdk, Wasmtime, wit-bindgen, WASI WIT, MrDocs and Chrome. The installer still runs on every job, preserving its version checks and environment exports. Cache service failures do not fail a job: a miss uses the prepared bundle, and a failed save leaves the validated installation usable. Linux-X64 cold caches for the five open-source tools come from the prepared public OCI bundles. The bundle is copied from a stopped container and every file is verified before publication in the local cache. Normal installations of those tools require verified cache entries and never fall back to upstream. Other supported hosts keep their checked upstream downloads. Chrome uses its official download and the same verified cache, without public redistribution of its binaries: the upstream maintainer distinguishes the binary terms from the repository license in issue 21.

  • tools/ci/download.sh <url> <sha256> <file> verifies downloaded or cached bytes, publishes complete files atomically, and leaves no output after failure. WEBCPP_DOWNLOAD_CACHE selects a content-addressed cache; WEBCPP_DOWNLOAD_OFFLINE=1 forbids curl on a missing or corrupt entry. Connection, transfer and retry windows are bounded. No test verdict is cached.

Preparing and updating environments. An owner explicitly dispatches CI with prepare-environment=true at the reviewed source commit. The preparation workflow builds the native image from the dated Ubuntu snapshot and downloads the pinned tool archives afresh. Only its publisher has packages: write. The package ghcr.io/webcpporg/ci-environment must be made public once after initial creation; a public repository does not imply public package visibility. Separate runners prove anonymous digest pulls, offline tool installation and native C++20 compilation before producing the ci-environments artifact. Download that artifact's generated environments.json into tools/ci/, review and commit it with the recipe changes, then run the complete normal CI. Do not edit generated digests or merge a recipe without its verified pins. A failed preparation leaves the previous checked-in environments in use.

gh workflow run ci.yml --repo webcpporg/webcpp --ref <reviewed-branch> \
  -f prepare-environment=true
gh run download <successful-preparation-run> --repo webcpporg/webcpp \
  --name ci-environments --dir tools/ci

This isolates the covered tools from upstream availability during ordinary CI, not every dependency. Checkout, the GitHub registry/cache, setup-node and npm, Emscripten's source fetch and the Rust/Cargo fixture remain prerequisites. The full lane set, b2 -a, fresh XML and missing-result checks remain mandatory.

  • tools/ci/helpers.sh holds what the actions share, which each install.sh sources beside download.sh: digest, the SHA-256 of files one after the other; mixed, a path as Windows programs read it; configuration, CMake's Debug on Windows and Release elsewhere; and compiler_identity, the first line of the --version of each of CC and CXX that is set, else the image. A cache key names it with the action's own files.

tools/ci/actions_test.py pins download.sh and helpers.sh (and that no action defines a function of its own that helpers.sh holds), the Boost action's prefix checks and the layouts it installs the headers and b2 in, and where the wit-bindgen, WASI WIT and emsdk actions install what they download, what they leave out, and their refusals; that the wasi-sdk action replaces the runner's sysroot and builtins with the platform-independent ones, and fails on a target those lack builtins for: a runner no build of wit-bindgen or emsdk is pinned for, a crate that holds no WIT, an emsdk at another commit, a release without its node_modules, an archive emsdk would download unpinned, and an emcc that is not 6.0.11; the emsdk action's node wrapper, EM_CACHE, warmed cache and system libraries; that no libsecp256k1 action remains; the chrome action's shell and its --no-sandbox wrapper; and the container image, pulled by an immutable digest without a build fallback. tools/ci/environment_test.py checks recipe identity, archive restoration and publication boundaries; tools/ci/download_cache_test.py checks offline reuse, corruption, interrupted transfers and atomic output. Their refusal tests cover bad hashes and unsupported runners. Source-provider tests live in tools/openssl/build_test.py, tools/test/openssl_test.py and tools/test/libdatachannel_test.py: they cover source pins, staged content, compiler variants, the single OpenSSL provider, and OpenSSL's one fixed prefix, /webcpp-openssl, which libcrypto keeps as its modules and engines directories and install_dev stages under DESTDIR, so that the library is the same bytes wherever it is built. They are separate from runtime evidence and the full upstream OpenSSL suite.

The site. On every run of the superproject's CI, the job site runs b2 site, the preview ("The site", above), with the pages the docs job built and the report, -sWEBCPP_SITE_DOCS and -sWEBCPP_SITE_REPORT, a red matrix included. On a push to main, publish pushes that build, as the one commit of an orphan branch gh-pages, to webcpporg/webcpporg.github.io, whose Pages serve it at https://webcpporg.github.io/, with that repository's deploy key, the secret SITE_DEPLOY_KEY; then pages deploys the superproject's own Pages, the old address https://webcpporg.github.io/webcpp/, as tools/site/redirect.py's two pages, which send every path under it to the same path at the root and carry noindex too.

It fails, naming each fault, when a library has no page, when the index does not link a library's page, when a page does not carry the robots of its channel, or when a link of any page names no file of the site or no anchor of its page: an index built without -sWEBCPP_INDEX=site links out of the site, and fails.

A library's commits reach its own main first; then the superproject's commit that moves its submodule is pushed to the superproject's main, whose CI tests every library at the commits its submodules point to. What fails there is fixed with a test, in the library or in the superproject, by more commits on main; then each library's CI runs again, against the superproject's new main. main is the only branch.

5. Changelogs and releases

The changelog

  • Every change a user can see adds its line, in the same commit. A library's goes in its doc/changelog.adoc, under "Unreleased"; one of the superproject's tools or build in the release notes of the version in preparation, doc/releases/<version>.adoc, under "Tools and build", which lists what changes for whoever builds, lints or tests with it: its b2 rules and targets, the lint's rules, the CI's lanes. Agents write them: for webcpp, this replaces the rule of never editing a changelog.
  • A line is one bullet: * , a past-tense verb (Added, Changed, Deprecated, Fixed, Improved, Removed or Updated), then one sentence of about ten words, what a user sees rather than how it was done; it may wrap onto the next lines. A breaking change starts with *Breaking change:* and says what the user must change; a deprecation names what replaces it; a fixed bug names the symptom, with its issue or pull request when there is one, https://github.com/webcpporg/<library>/issues/<n>[#<n>]. A line holds no cross-reference, <<...>>: the index page shows it too, where the library's anchors are not. Nor does it hold an inline anchor, [[...]], which shows no text: a C++ attribute is passthrough code, `+[[nodiscard]]+`.
  • At most ten lines per library and version, the most important first; a version's documentation work is one line. A library's change that no user sees (a test, its CI, a refactoring) gets none.
  • The file. [appendix], [#<library>-changelog], == Changelog, a paragraph, then === Unreleased and each released version, === webcpp <version>, newest first, each with its anchor ([#<library>-changelog-unreleased], [#<library>-changelog-0-1-0]) and its lines between // tag::unreleased[] (// tag::<version>[]) and its end::. A released section is never rewritten: a correction is a line of the next version. The lint's rule changelog form checks every changelog and release notes on every run (tools/release/changelog.py).
  • The release notes, doc/releases/<version>.adoc, hold what belongs to the collection, in Boost's sections: New Libraries (one line each, what it is, "from "), Updated Libraries (each library a section that includes its changelog's region, alphabetical), Removed Libraries (what went out, and what replaces it), Tools and build, Compilers tested (the tested compiler lanes, a nonempty ordered unique subset of the CI's canonical lane names). List only the compilers actually tested for this release; a local-only release does not claim coverage of other CI lanes. The index page includes each, newest first. While a version is in preparation its notes open with the paragraph "In preparation: ..." and include each library's tag=unreleased.

Releases

webcpp has one version, WEBCPP_VERSION in <webcpp/version.hpp> (libs/config), the one place it is written: 0.1.0 is 100, WEBCPP_LIB_VERSION "0_1". Nothing may follow the number on its #define WEBCPP_VERSION line but trailing spaces: both the Jamroot and tools/release/release.py read that line, and both refuse anything else there, a trailing comment included. The Jamroot reads it for the release targets, which run only when named:

Command What it does
b2 check-release fails, naming each fault, when a library changed since the last tag (under include/, build.jam, wit/, meta/libraries.json, README.md, example/, doc/ or LICENSE*) has no line, when the notes miss a library, when a new or removed submodule is not under New or Removed Libraries, when the version disagrees anywhere, when a line or a file breaks the form above, or when the What's new's highlights break theirs
b2 whats-new writes doc/releases/<version>.whats-new.md, the skeleton of the GitHub Release's body, in Boost's form: at most five highlights, a bold category and at most 20 words each; never over a file that exists
b2 dist builds every page, then bin/dist/webcpp-<version>.tar.gz, reproducible (sources at the recorded commits, built pages, no dot files), and its sha256sum file .tar.gz.txt

check-release reads every library's checkout, so git submodule update --init runs first: a submodule of HEAD not checked out fails it by name (git submodule update --init libs/<name>).

dist also bundles the tracked sources and upstream licences of site and third_party/libs/<name> at their recorded commits, with no dot files. Required libdatachannel nested repositories (libjuice, libsrtp, plog, usrsctp) are included at the exact gitlinks recorded in tools/libdatachannel/pin.json. The policy applies only when its parent commit matches the root's source pin. Each included checkout must be clean and at its recorded commit; initialize libdatachannel recursively before packaging. dist never initializes sources. Unused nativejson-benchmark submodules and the exact optional OpenSSL and libdatachannel gitlinks listed in their pin files are omitted. A changed or unknown nested gitlink is refused, never silently skipped. Source builders validate the distributed paths, file modes and content hashes before executing upstream build code, so an unpacked archive needs no Git metadata.

A successful release check or source archive is preparation evidence. It neither publishes 0.1.0 nor proves the final candidate's CI. Keep In preparation and Unreleased until the separately authorized release procedure below.

Nothing is released until the owner asks. Then:

  1. In every library whose "Unreleased" holds lines, it becomes === webcpp <version>, with its anchor and region, under a new empty "Unreleased"; the notes lose their paragraph "In preparation: ..." and include tag=<version>; each repository commits, and the superproject records each library's commit.
  2. b2 check-release passes.
  3. b2 whats-new; an agent writes the highlights from the notes, and the owner approves them before the tag.
  4. b2 -a dist.
  5. The tag webcpp-<version> goes on the superproject and on every library at the commit the superproject records. Whether it is signed is the owner's decision then.
  6. The GitHub Release webcpp-<version> carries the archive, its checksum file and the "What's new" as its body: gh release create webcpp-<version> bin/dist/webcpp-<version>.tar.gz bin/dist/webcpp-<version>.tar.gz.txt --title "webcpp <version>" --notes-file doc/releases/<version>.whats-new.md.
  7. Right after, version.hpp names the next version, whose notes are opened from tools/release/template.adoc (sed -e 's/@VERSION@/<next>/g' -e 's/@ANCHOR@/<next with dashes>/g') and included first by the index.

6. b2 facts

Each of these was measured; each has cost time.

  • Every b2 run unsets CPATH, CPLUS_INCLUDE_PATH and C_INCLUDE_PATH. A shell that sets them (Homebrew's often does) makes the compiler read another Boost before the configured one, without a word; the Jamroot refuses to run while one is set:

    env -u CPATH -u CPLUS_INCLUDE_PATH -u C_INCLUDE_PATH b2 ...
    
  • A verdict is built from scratch, b2 -a: b2 compares timestamps, and an edit in the same second as the last build is missed.

  • $( inside an action is b2's, not the shell's. b2 expands $(name) in an action's text, so a shell $(command) silently becomes empty; write command substitution with backquotes.

  • An action of more than one command opens with set -e, or a failing command in its middle goes unnoticed.

  • <build>no is conditioned on the toolset, never on a derived feature such as <target-os>: b2's evaluation of conditional requirements then never settles, since <build>no replaces every other conditional result, <target-os>wasi among them.

  • A syntax error in a Jamfile only prints, and every target declared after it silently stops existing. When a target is "not found", read the first lines of b2's output.

  • A subproject's target is named with its project: b2 libs/xactor/test//scheduler, b2 libs/xactor/doc//reference.

  • testing.launcher applies to every toolset of one request, so a wasm lane and a native one are two b2 runs.

  • b2's emscripten toolset runs a test with node itself: testing.launcher=node makes the command node "node" x.js, and webcpp refuses it.

  • With --out-xml, b2 exits 0 even when a test fails; the report's exit status is the verdict, and the report needs --dump-tests.

  • b2 5.5.3's emscripten toolset links at no level of optimization: it compiles at the one <optimization> names (-O3 in release), as gcc.jam maps it, and gives its link none, which em++ runs at -O0. The Jamroot gives the link the compile's level (chapter 4, Targets).

  • b2 5.5.3's --command-database writes nothing, so the compilation database comes from tools/lint/compile_commands.py, which reads b2's dry run (b2 -n -a).

  • Every -s of the command line and every variable of the environment is a global variable, which modules.peek reads and a user-config.jam loaded after them may replace with its modules.poke: only ARGV tells the command line's value apart, in both its forms, -sNAME=<value> and -s NAME=<value>, and nothing tells user-config.jam's from the environment's. An environment value is split at each space, a *PATH one at the path separator, so it is joined again ($(value:J=" ")).

  • A free feature plays no part in a target's build directory: an example's output from one launcher would read as up to date under another, which is why webcpp.example always runs again.

  • wasm32-wasip2 and wasm32-wasip3 are no system b2 knows. The Jamroot adds the <target-os>wasi value after the toolsets are loaded, so that gcc's Unix link options (--start-group, -Bstatic, rpath), which wasm-component-ld rejects, are never chosen for it.

  • Boost's location. boost.use-project takes the using boost of user-config.jam, else BOOST_ROOT, else the compiler's default paths. Apple's clang searches /usr/local/include before every -isystem directory, so clang keeps Boost's directory as -I and marks the headers <boost/...> names as system ones (--system-header-prefix=boost/).

  • A <tag> given as a usage requirement renames the dependent's executable (measured, .superpowers/sdd/plan-reviews/asio-plan/b2-tag), and a target whose sources name <program>/<feature>value builds that program with that value.

  • A checkout path that holds a space builds: every path b2 hands to an action is quoted, and the tests of the build run in such a path.

  • b2 makes a directory once per spelling of it, relative or absolute (common.MkDir), and a build names some by both: bin/third_party, a configuration's own directory absolute and a consumer's selection relative, and a library's test directory under bin/libs, the oracle's node-modules.stamp absolute. Under -j the two actions run at once. b2's action on Windows, if not exist "d" mkdir "d", then fails when the other one makes the directory between its test and its mkdir, and every target under it is skipped (CI run 44690351573, ...failed common.mkdir bin\third_party...); mkdir -p, elsewhere, does not. tools/webcpp-mkdir.jam makes Windows's action succeed whenever the directory is there after it, and tools/test/mkdir_test.py checks it.

  • A target named release-<word> is no target. b2 reads it as the variant release with a subfeature and stops before it builds anything ("release-check" is not a known value of feature <variant>); debug- and profile- likewise. The release check is check-release.