diff --git a/.github/workflows/library.yml b/.github/workflows/library.yml index 968fe55e..04a2fefe 100644 --- a/.github/workflows/library.yml +++ b/.github/workflows/library.yml @@ -25,8 +25,8 @@ # runs b2 declared-lanes and writes the matrix of own lanes, those a library # declares with webcpp.lane, such as its oracle's, and says whether a library # needs libraries that webcpp does not build yet (external), trystero's -# libsecp256k1, libdatachannel and OpenSSL, which the CI's actions of those names -# install, until webcpp builds them from third_party/. +# libsecp256k1, installed by its action. B2 builds OpenSSL and +# libdatachannel from pinned sources with one provider per program. # lanes one job per lane, which runs the lane command, b2 -a --dump-tests # --out-xml=.xml for one toolset, and uploads the XML. With --out-xml, b2 # exits 0 even when a test fails: the report gives the verdict. A wasip2 or @@ -145,6 +145,15 @@ jobs: persist-credentials: false path: libs/${{ inputs.library }} + # Only these pinned nested sources are needed. Do not fetch the unused + # JSON fixtures or the benchmark repository's unrelated submodules. + - &transport-sources + name: Check out the transport source dependencies + shell: bash + run: | + git -C third_party/libs/libdatachannel submodule update --init \ + deps/libjuice deps/libsrtp deps/plog deps/usrsctp + - &boost uses: ./tools/ci/actions/boost @@ -216,6 +225,11 @@ jobs: - *superproject-for-library - *make-room - *library + - name: Verify Windows driven-test process cleanup + if: runner.os == 'Windows' + timeout-minutes: 5 + run: python tools/drive/drive_test.py + - *transport-sources - *boost # What a WASI lane installs, which the own-lanes job installs too, by these anchors, for an @@ -252,16 +266,8 @@ jobs: if: matrix.node uses: ./tools/ci/actions/node - # The libraries a library of the lane needs and webcpp does not build yet, for an entry - # that says external, which the own-lanes job installs too, by these anchors: OpenSSL - # first, which libdatachannel is built against; libsecp256k1, for emscripten too, after - # emsdk, on an entry that has it; and libdatachannel, with the lane's compilers, since a - # program shares the types of its C++ API. Only the native backend needs OpenSSL and - # libdatachannel, so an entry on emscripten has neither. - - &openssl - if: matrix.external && !matrix.emsdk - uses: ./tools/ci/actions/openssl - + # libsecp256k1 remains external. OpenSSL and libdatachannel are source-built + # by B2 with the consuming target's toolchain and threading properties. - &secp256k1 if: matrix.external uses: ./tools/ci/actions/secp256k1 @@ -269,13 +275,6 @@ jobs: cc: ${{ matrix.cc }} emscripten: ${{ matrix.emsdk }} - - &libdatachannel - if: matrix.external && !matrix.emsdk - uses: ./tools/ci/actions/libdatachannel - with: - cc: ${{ matrix.cc }} - cxx: ${{ matrix.cxx }} - # The image a container lane runs b2 in (its entry's container), which the container job # built and cached, restored from the cache, so that the lane builds none. - if: matrix.container @@ -326,6 +325,7 @@ jobs: - *superproject-for-library - *make-room - *library + - *transport-sources - *boost - *wasi-sdk - *wasmtime @@ -333,14 +333,56 @@ jobs: - *wasi-wit - *emsdk - *node - - *openssl - *secp256k1 - - *libdatachannel # The pinned chrome-headless-shell, as CHROME, for a lane whose driver meets a browser # (its entry's chrome), as trystero's interop does. - if: matrix.chrome uses: ./tools/ci/actions/chrome + with: + product: ${{ matrix.library == 'beast' && 'chrome' || 'chrome-headless-shell' }} + + - name: Build the native Beast interoperability peer + if: matrix.library == 'beast' && (matrix.lane == 'browser' || matrix.lane == 'browser-node') + shell: bash + run: | + python3 tools/ci/matrix.py register clang-18 + b2 --user-config=.local/user-config.jam \ + libs/beast/test/browser/peer//native_peer-program \ + toolset=clang-18 threading=multi -j2 + + # This embedding adds a private test CA through Wasmtime's supported host hook. + # Stock Wasmtime uses its bundled public roots and has no CLI test-CA option. + - name: Restore the isolated WASI HTTPS host fixture + if: matrix.library == 'beast' && matrix.lane == 'applications-host-tls' + id: host-tls-cache + uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: .local/beast-host-tls + key: beast-host-tls-${{ runner.os }}-${{ runner.arch }}-rust-1.97.1-${{ hashFiles('libs/beast/test/applications/host-tls/Cargo.lock', 'libs/beast/test/applications/host-tls/Cargo.toml', 'libs/beast/test/applications/host-tls/src/**') }} + + - name: Build the isolated WASI HTTPS host fixture + if: matrix.library == 'beast' && matrix.lane == 'applications-host-tls' + shell: bash + run: | + rustup toolchain install 1.97.1 --profile minimal + cargo +1.97.1 build --locked --jobs 2 \ + --manifest-path libs/beast/test/applications/host-tls/Cargo.toml \ + --target-dir .local/beast-host-tls + echo "WEBCPP_WASI_TLS_FIXTURE=$PWD/.local/beast-host-tls/debug/webcpp-beast-host-tls-fixture" >> "$GITHUB_ENV" + + - name: Save the isolated WASI HTTPS host fixture + if: matrix.library == 'beast' && matrix.lane == 'applications-host-tls' && steps.host-tls-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: .local/beast-host-tls + key: ${{ steps.host-tls-cache.outputs.cache-primary-key }} + + - name: Verify Beast application inventory and HTTP fixtures + if: matrix.library == 'beast' && matrix.lane == 'applications-host-clients' && matrix.platform == 'wasip2' + run: | + python3 libs/beast/test/applications/inventory_test.py + python3 libs/beast/test/applications/driver_test.py # It registers its toolset in .local/user-config.jam, prints its b2 command and runs it. - name: Own lane @@ -367,6 +409,18 @@ jobs: path: bin/**/*.sizes.md if-no-files-found: ignore + - name: Upload OpenSSL upstream test evidence + if: always() && matrix.library == 'asio' && startsWith(matrix.lane, 'openssl-upstream') + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: openssl-upstream-${{ matrix.id }} + path: | + bin/**/upstream-tests.log + bin/**/upstream-tests.json + bin/**/build.json + if-no-files-found: warn + retention-days: 7 + docs: name: Documentation needs: plan @@ -379,6 +433,7 @@ jobs: - *superproject-for-library - *make-room - *library + - *transport-sources - *boost - uses: ./tools/ci/actions/node @@ -402,20 +457,11 @@ jobs: # The libraries the library, or one it uses, needs and webcpp does not build yet (the # plan's external), whose headers its reference parses with the native backend's: with Clang 18, # the compiler that parses them. - - if: needs.plan.outputs.external == 'true' - uses: ./tools/ci/actions/openssl - - if: needs.plan.outputs.external == 'true' uses: ./tools/ci/actions/secp256k1 with: cc: clang-18 - - if: needs.plan.outputs.external == 'true' - uses: ./tools/ci/actions/libdatachannel - with: - cc: clang-18 - cxx: clang++-18 - # clang++ reads the headers for tools/doc/doc_comments.py; the Boost check compiles with # the same Clang. The index links each library's page where the site serves it. # A page whose library needs external libraries requires them, as a lane does, and is @@ -432,8 +478,7 @@ jobs: fi if [ "$EXTERNAL" = true ]; then request=(webcpp-require-external=on "${request[@]}") - for variable in SECP256K1_ROOT SECP256K1_EMSCRIPTEN_ROOT LIBDATACHANNEL_ROOT \ - OPENSSL_ROOT; do + for variable in SECP256K1_ROOT SECP256K1_EMSCRIPTEN_ROOT; do if [ -n "${!variable-}" ]; then request=("-s$variable=${!variable}" "${request[@]}") fi @@ -504,6 +549,7 @@ jobs: persist-credentials: false path: libs/${{ inputs.library }} fetch-depth: 0 + - *transport-sources - *boost - uses: ./tools/ci/actions/wasi-sdk @@ -526,21 +572,12 @@ jobs: # lint-external), which the dry runs name and clang-tidy reads, built with Clang 18; and # libsecp256k1's emscripten build too when a library declares emscripten, for the commands # of that target. - - if: needs.plan.outputs.lint-external == 'true' - uses: ./tools/ci/actions/openssl - - if: needs.plan.outputs.lint-external == 'true' uses: ./tools/ci/actions/secp256k1 with: cc: clang-18 emscripten: ${{ needs.plan.outputs.has-emscripten }} - - if: needs.plan.outputs.lint-external == 'true' - uses: ./tools/ci/actions/libdatachannel - with: - cc: clang-18 - cxx: clang++-18 - # The compilation database is what b2 compiles with its default toolset, the first that # user-config.jam registers, Clang 18, and, for what only a WASI target or emscripten # builds, with the toolset of that target: a WASI dry run generates the bindings its @@ -570,6 +607,7 @@ jobs: shard: [1, 2, 3, 4, 5, 6, 7, 8] steps: - *superproject + - *transport-sources - *boost - uses: ./tools/ci/actions/wasi-sdk diff --git a/.gitmodules b/.gitmodules index 269eeffc..23e77683 100644 --- a/.gitmodules +++ b/.gitmodules @@ -40,3 +40,9 @@ [submodule "libs/asio"] path = libs/asio url = ../asio.git +[submodule "libs/beast"] + path = libs/beast + url = ../beast.git +[submodule "third_party/libs/libdatachannel"] + path = third_party/libs/libdatachannel + url = https://github.com/paullouisageneau/libdatachannel.git diff --git a/AGENTS.md b/AGENTS.md index dcb231a3..6438245f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -73,7 +73,8 @@ for web developers and for AI developers (`CODING-GUIDELINES.md` chapter 16). | Library | What it is | Targets | State | | --- | --- | --- | --- | -| asio | Boost.Asio and Cobalt with browser event-loop suspension, WASIp3 networking and optional source-built TLS | native, emscripten, wasip3 | a submodule at `libs/asio`; see its feature matrix for variants | +| asio | Boost.Asio and Cobalt 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 | | 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` | | 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) | @@ -160,7 +161,7 @@ webcpp/ 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, - secp256k1,libdatachannel,openssl,chrome,container,mrdocs,node}/ + secp256k1,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 @@ -221,7 +222,7 @@ Jamroot is its build configuration, and `libs/` is its repository. - b2 (B2 5.5.3 measured); - a C++20 compiler; - Python 3.9 or newer; -- for WebAssembly: wasi-sdk 34 and wasmtime 47 (47.0.3 measured); +- for WebAssembly: wasi-sdk 34 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 @@ -239,26 +240,31 @@ Jamroot is its build configuration, and `libs/` is its repository. 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, until webcpp builds them from `third_party/` - (`CODING-GUIDELINES.md` chapter 16): libsecp256k1 0.8.0, static, with its - `schnorrsig` and `extrakeys` modules, natively and, for emscripten, built - with Emscripten; and, for its native backend, libdatachannel 0.24.6, built - with the compiler and the standard library that build the programs, and - OpenSSL 3. Each is found in the directory of its `include/` and `lib/` that - `-sSECP256K1_ROOT=`, `-sSECP256K1_EMSCRIPTEN_ROOT=`, - `-sLIBDATACHANNEL_ROOT=` and `-sOPENSSL_ROOT=` on b2's command - line name, never the environment, else in `.local/secp256k1-native`, - `.local/secp256k1-emscripten`, `.local/libdatachannel` and `.local/openssl` - when it holds the library's header (below), else, natively outside Windows, - in `/usr/include` or `/usr/local/include`, where a system install is - legitimate; a relative `-s` is read from b2's working directory. When none - holds a library's header, trystero is left out, its programs skipped, with - one line that names the library and every place it looked, so that `b2 test` - builds every other library, and the index names trystero without a link to - its page; with `webcpp-require-external=on` on b2's command line, as the CI - and the lint build, the build stops instead, naming both libraries - (`webcpp.external` and its kin, chapter 4). trystero's page says how each is - built. The CI's actions build them so (chapter 4). +- for trystero: libsecp256k1 0.8.0, static, with `schnorrsig` and + `extrakeys`, built natively and, for browser programs, with Emscripten. + Only this dependency remains externally provisioned. B2 reads + `-sSECP256K1_ROOT=` and `-sSECP256K1_EMSCRIPTEN_ROOT=` from its + command line, never the environment; otherwise it searches + `.local/secp256k1-native` and `.local/secp256k1-emscripten`, then the native + system include paths outside Windows. A missing dependency leaves trystero + out with a diagnostic, or fails when `webcpp-require-external=on`, as in CI; +- for native Trystero: CMake and Make (nmake on Windows), and the pinned + `third_party/libs/libdatachannel` checkout with its required nested sources. + Initialize it with `git submodule update --init --recursive + third_party/libs/libdatachannel`. B2 builds static libdatachannel and its + nested dependencies with the consumer's compiler and runtime settings. + Native Trystero requires `threading=multi` and exceptions; a single-thread + request is refused because this backend uses worker threads; +- 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. 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 @@ -342,7 +348,7 @@ looks. `src/detail/*.cpp` and `src/io/*.cpp`, excluding `src/main.cpp` and `src/io/ssl.cpp`. It supplies no default `co_main` runner; `/webcpp/asio//cobalt` adds the webcpp runner. Ordinary `main` consumers can use the archive directly. -On WASIp3, `tools/boost/cobalt-wasip3` verifies a Boost 1.92 compatibility patch +On WASIp2/P3, `tools/boost/cobalt-wasip3` verifies a Boost 1.92 compatibility patch and prepares private headers and endpoint/acceptor sources. The archive and consumers use the same Asio overlay and thread profile. Signal, serial-port and seqpacket sources are omitted, along with `thread.cpp` in single-thread @@ -351,6 +357,9 @@ Boost headers and sources remain untouched. Every Cobalt target also uses the checked `tools/boost/cobalt-common` header overlay: Boost 1.92's composition promise must connect its cancellation source to the received completion handler. Both compiled operations and application-defined compositions receive this fix. +The common overlay also supplies `unhandled_exception` for main and thread +promises in no-exceptions builds; the thread coroutine is exercised by Asio's +`threads` own lane, natively and on cooperative WASIp3. Rebase and verify the common patch before using a different Boost version. TLS consumers combine the Cobalt target with `/webcpp/asio//tls` and await Asio SSL operations with Cobalt tokens. `/webcpp//boost_cobalt_io_ssl` optionally @@ -358,17 +367,32 @@ compiles `io/ssl.cpp` with `BOOST_COBALT_SSL_SOURCE=1`, source-built OpenSSL and the checked shared patch in `tools/boost/cobalt-ssl`. It preserves handler associations, fixes handshake state and callback constraints, and exposes a borrowed `native_ssl_handle()` for SNI. `/webcpp/asio//cobalt_ssl` adds the -runner and CA factory. Native and WASIp3 consumers share these SSL corrections; -browser/WASIp2 are refused. Plain Cobalt does not acquire an OpenSSL dependency. -Run `cobalt_ssl_cancel` through `tools/openssl/test/tls.py --state-test` for -primitive/composed TLS transfer cancellation, truncated shutdown and cancelled -shutdown. Require actual pending operations and transport/protocol observations, +runner and CA factory. Native and WASIp2/P3 consumers share these SSL corrections; +browser OpenSSL is refused. Plain Cobalt does not acquire an OpenSSL dependency. +Asio's `tls-integration` own lane drives the real OpenSSL/Cobalt fixtures on +native and WASIp3 profiles, including primitive/composed transfer cancellation, +truncated shutdown and cancelled shutdown. Its native `openssl-upstream` lane +requests `webcpp-openssl-tests=on`: the exact archives pass upstream's full +`alltests` suite before the TLS consumer links. The upstream harness cannot run +on WASI; its separate TLS/entropy integration tests do not substitute for it. +The `openssl-upstream-msvc-14.3` and `openssl-upstream-msvc-14.5` aliases +select their matching Windows runners/toolsets; the default native upstream +lane uses Linux. CI uploads upstream logs, proof and build manifests even on +failure. Lane declarations describe recurring coverage, not a successful CI run. Require actual pending operations and transport/protocol observations, not guessed sleeps. Terminal transfer cancellation does not promise safe reuse. Its sources define `BOOST_COBALT_SOURCE=1` and `BOOST_COBALT_IO_SOURCE=1`, while consumers receive `BOOST_COBALT_NO_LIB=1`. On Emscripten, both sources and consumers define `BOOST_ASIO_DISABLE_THREADS`; native thread support is unchanged. Use the shared `BOOST_SOURCE` setup above, not a separate Cobalt source tree. +**Windows Asio allocator overlay.** `tools/boost/asio-windows` passes the +context allocator into Boost 1.92's existing `win_thread` constructor for the +IOCP worker and timer thread. Asio and compiled Cobalt use the same checked +private headers on Windows only. The manifest verifies the original and patched +hashes, without modifying installed Boost. Native allocation tests construct the +context and its first timer inside the counted window. A prepared overlay or a +dry run alone is not evidence that a Windows program ran. + **Cobalt without exceptions.** A build that uses `/webcpp//boost_cobalt` with `exception-handling=off` emits a non-fatal configuration warning with https://github.com/boostorg/cobalt/issues/287 and recommends enabling exception @@ -386,16 +410,13 @@ verified, rather than assuming a newer Boost release fixes the issue. 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`, and trystero's libraries in -`.local/secp256k1-native`, `.local/secp256k1-emscripten`, -`.local/libdatachannel` and `.local/openssl` (`include/openssl` and the two -libraries of the system's OpenSSL 3, linked, as the CI's `openssl` action -lays them out), where the CI's actions install them too (chapter 4). The -build finds each of them there with no `-s`: `b2 -a doc`, whose reference -parses trystero's native backend, runs as it is. Another directory is named -with `-sSECP256K1_ROOT=` and its kin on b2's command line, never with -the environment, as for the emsdk below: a variable a shell keeps from -another day would replace `.local/` without a word. A tool the build looks up itself is +`.local/emscripten-cache`, and trystero's external libsecp256k1 installs in +`.local/secp256k1-native` and `.local/secp256k1-emscripten`. The CI action +uses those same paths. B2 finds them without `-s`; another prefix is named +with `-sSECP256K1_ROOT=` or `-sSECP256K1_EMSCRIPTEN_ROOT=` on its +command line. Source-built OpenSSL and libdatachannel instead 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 @@ -443,7 +464,8 @@ told: `b2 --user-config=.local/user-config.jam ...`. | `b2 libs//test` | one library's tests; `libs//example` and `libs//doc` likewise | | `b2 libs//test//` | one test, while working on it (`scheduler`) | | `b2 libs//doc//reference` | one library's API reference alone, MrDocs strict | -| `b2 toolset=clang-wasip2 testing.launcher=wasmtime libs//test libs//example` | the same for wasm32-wasip2; `clang-wasip3` for wasm32-wasip3; one toolset per command | +| `b2 toolset=clang-wasip2 testing.launcher=wasmtime libs//test libs//example` | the same for wasm32-wasip2; one toolset per command | +| `b2 toolset=clang-wasip3 testing.launcher=tools/boost/asio-wasip3/run.sh libs//test libs//example` | wasm32-wasip3 with the test networking capabilities | | `b2 toolset=emscripten libs//test libs//example` | the same for emscripten, whose programs b2's toolset runs with node itself: never with a `testing.launcher` (chapter 4) | | `b2 install --prefix=` | copies every library's headers to `/include/webcpp/`, and its licence files, `LICENSE_1_0.txt` and a port's `LICENSE-.txt`, beside them in `/include/webcpp//` | | `b2 declared-targets -d0` | prints each ` ` pair the libraries declare: the CI's lanes | @@ -850,7 +872,7 @@ A target is what a program is built for: | `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=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 @@ -988,7 +1010,9 @@ webcpp.boost-test : + : * ; webcpp.example : * : * ; webcpp.headers-alone : : * : * : * ; webcpp.link : + : * : * ; +webcpp.link-fail : + : * : * ; webcpp.data + ; (requirements) +webcpp.source-only + ; (reference source trees) ``` | Rule | Passes when | Notes | @@ -998,8 +1022,10 @@ webcpp.data + ; (requirements) | `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@:* {{}}` for a header they include or `// expected-error@+1 {{}}` for the next line | compiled with `-Xclang -verify -Xclang -verify-ignore-unexpected=error,note`, so an error not stated and a note are ignored; 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 `.expected` beside it | its standard input is `.input` beside it, else empty, never the terminal, on every target (wasmtime passes it through, and node under `-sNODERAWFS=1`); 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 `.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 `-program` is the same program, an `exe` of the same sources and requirements, `-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-` with `/` as `-` (`alone-xactor-scheduler`), against `/webcpp///` 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 `/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 | @@ -1116,7 +1142,7 @@ webcpp.drive : + : * :