Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2510,7 +2510,10 @@ superproject's new `main`. `main` is the only branch.
is, "from <authors>"), 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
CI's lanes). The index page includes each, newest first. While a version
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`.

Expand All @@ -2534,6 +2537,15 @@ targets, which run only when named:
--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 the root
source submodules `site` and `third_party/libs/<name>`, at their recorded
commits, with no dot files. Each must be checked out at that commit and
hold no uncommitted changes. It never initializes submodules. The unused
upstream nested submodules of `third_party/libs/nativejson-benchmark` are
omitted, as chapter 2 requires; its own sources, benchmark data and licence
are bundled. Every other unsupported root or nested submodule is refused
by name, so required sources are never silently omitted.

Nothing is released until the owner asks. Then:

1. In every library whose "Unreleased" holds lines, it becomes
Expand Down
13 changes: 2 additions & 11 deletions doc/releases/0.1.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
[#webcpp-0-1-0]
= webcpp 0.1.0

In preparation: no tag names this version yet, and its libraries' entries
are their changelogs' "Unreleased" sections.

[#webcpp-0-1-0-new-libraries]
== New Libraries

Expand Down Expand Up @@ -52,6 +49,8 @@ None.
[#webcpp-0-1-0-tools-and-build]
== Tools and build

* Fixed source distributions rejecting pinned site and third-party dependencies.
* Changed release checks to accept the tested compiler subset.
* Added agent skills with validated metadata for common contributor workflows.
* *Breaking change:* changed wasip2 programs to build with exceptions, as
wasip3 does; whether a program uses them is its developer's choice.
Expand Down Expand Up @@ -171,13 +170,5 @@ theirs, so a pinned third-party repository's own submodules are not fetched.
[#webcpp-0-1-0-compilers-tested]
== Compilers tested

* GCC 14 (container, no network)
* GCC 15
* Clang 18 (libstdc{plus}{plus}, container, no network)
* Clang 22 (libstdc{plus}{plus})
* Apple Clang (macOS 15)
* MSVC 14.3 (Visual Studio 2022)
* MSVC 14.5 (Visual Studio 2026)
* Emscripten 6.0.11 (node)
* wasm32-wasip2 (wasi-sdk 34, wasmtime 47.0.3)
* wasm32-wasip3 (wasi-sdk 34, wasmtime 47.0.3)
50 changes: 50 additions & 0 deletions doc/releases/0.1.0.whats-new.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# webcpp 0.1.0

webcpp 0.1.0 is out.

## New libraries

- **config**: webcpp's configuration, which every library includes first: the target, exceptions and the version, from R.
- **document**: a header-only JSON document for C++20 that behaves as JavaScript does, exact in decimal, in one relocatable binary image, with a JavaScript module, from R.
- **idna**: a header-only library of internationalized domain names for C++20: Punycode, UTS 46 and IDNA2008 validity over Unicode 17.0.0 tables, from R.
- **lexical**: header-only validators of JSON Schema's string formats for C++20, allocating nothing, each also a Boost.URL grammar rule, from R.
- **pratt**: a header-only Pratt-parsing engine for C++20, with a decimal calculator built on it, from R.
- **trystero**: a port of Trystero 0.26.0, serverless WebRTC rooms wire-compatible with the original, for C++20, from R.
- **wasi**: a header-only HTTP handler for C++20 programs built as WebAssembly components, covering WASI 0.2 and WASI 0.3, from R.
- **xactor**: a header-only, deterministic actor system for C++20, from R.
- **xstate**: a header-only port of XState's state machines and actors for C++20, from R.

## Highlights

- **New libraries**: Nine C++20 libraries provide JSON, domain names, parsers, WebRTC rooms, WASI handlers and actor systems.
- **Security & reliability**: Trystero rooms share authenticated app connections while separate passwords remain isolated in distinct apps.
- **Developer experience**: Reproducible source packages include documentation, licenses and pinned source dependencies.

## Tools and build

- Fixed source distributions rejecting pinned site and third-party dependencies.
- Changed release checks to accept the tested compiler subset.
- Added agent skills with validated metadata for common contributor workflows.

## Trystero migration

Construct `webcpp::trystero::app` and call `app::join` instead of constructing a standalone
room with `room_config`. Put the immutable password in `app_config::password`; all rooms of
that app share it. Different passwords require separate apps and distinct peer IDs. The
Trystero JS 0.26.0 wire is unchanged. A remote JS page mixing room passwords retains the
upstream one-way-handshake limitation.

## Verification

This release is prepared without CI at the owner's request. Local checks cover the collection's
ordinary tests and examples on Apple Clang 21 (macOS 27), Emscripten 6.0.11 and GCC 15.2. On
GCC, Trystero's core is tested; its native backend uses dependencies built with libc++ and is
validated with Clang. Trystero also passes ASan/UBSan, its protocol oracle, 27 native and 24
browser interoperability scenarios against JS 0.26.0. Strict documentation and release-tool
checks pass. Windows, Linux container and WASI runtime lanes were not rerun for this release.

The archive includes the complete built HTML documentation. The hosted site is updated by CI,
so this publication does not redeploy it.

Release notes: `doc/releases/0.1.0.adoc` in the archive. Checksum:
`webcpp-0.1.0.tar.gz.txt`.
2 changes: 1 addition & 1 deletion libs/config
Submodule config updated 1 files
+7 −1 doc/changelog.adoc
2 changes: 1 addition & 1 deletion libs/document
Submodule document updated 1 files
+7 −1 doc/changelog.adoc
2 changes: 1 addition & 1 deletion libs/idna
Submodule idna updated 1 files
+7 −1 doc/changelog.adoc
2 changes: 1 addition & 1 deletion libs/lexical
Submodule lexical updated 1 files
+7 −1 doc/changelog.adoc
2 changes: 1 addition & 1 deletion libs/pratt
Submodule pratt updated 1 files
+7 −1 doc/changelog.adoc
2 changes: 1 addition & 1 deletion libs/trystero
Submodule trystero updated 1 files
+7 −1 doc/changelog.adoc
2 changes: 1 addition & 1 deletion libs/wasi
Submodule wasi updated 1 files
+7 −1 doc/changelog.adoc
2 changes: 1 addition & 1 deletion libs/xactor
Submodule xactor updated 1 files
+7 −1 doc/changelog.adoc
2 changes: 1 addition & 1 deletion libs/xstate
Submodule xstate updated 1 files
+7 −1 doc/changelog.adoc
2 changes: 1 addition & 1 deletion site
90 changes: 69 additions & 21 deletions tools/release/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
- notes in preparation include a library's region other than tag=unreleased, or a changelog has
the version's section already; frozen notes include a region other than tag=<a.b.c>, an
Unreleased holds lines, Compilers tested is None., or a tag webcpp-<a.b.c> is not at HEAD;
Compilers tested lists other lanes than the CI's, tools/ci/matrix.py's LANES, as the notes
write them;
Compilers tested is not a nonempty ordered unique subset of tools/ci/matrix.py's LANES,
as the notes write them;
- a library is no git checkout of its own, is no submodule at HEAD, is not checked out, or is
checked out at another commit than the superproject records;
- New Libraries or Removed Libraries is not exactly the libraries new or gone since the newest
Expand All @@ -52,12 +52,14 @@

dist writes webcpp-<a.b.c>.tar.gz into the directory --out names, and webcpp-<a.b.c>.tar.gz.txt, its
sha256sum line: the files the superproject's HEAD records and those each library's HEAD records,
and the pinned source submodules site and third_party/libs/<name>, with their upstream licences,
read from git's objects and never from the working tree, and the pages the doc build writes,
doc/html/index.html for the index and for each library, all under webcpp-<a.b.c>/, no path with a
part that starts with a dot. It refuses, naming each fault, a change HEAD does not record (named
alone, as check names it), a version other than version.hpp's, a library that is no checkout of its
own, not checked out, no submodule at HEAD or at another commit than HEAD records, a submodule other
than the libraries' own, libs/<name>, a link whose target is not UTF-8, absolute, outside its
own, not checked out, no submodule at HEAD or at another commit than HEAD records, a source
submodule not checked out at its recorded commit or holding uncommitted changes, an unsupported
submodule, a link whose target is not UTF-8, absolute, outside its
repository or a dot file, a page not built, and any other file under a doc/html. The archive is the
same bytes from the same commits and pages wherever, whenever, by whomever and under whatever time
zone, locale and umask it is written, with any CPython of 3.9 or later linked to zlib: its members
Expand All @@ -68,7 +70,9 @@
them, is refused before anything is read. No tar or gzip program is run. The archive and its
checksum are written to temporaries first, then each renamed over its file, the archive first: a
fault while writing, or renaming the archive, leaves both files as they were; one renaming the
checksum leaves the new archive beside the old checksum, and says so.
checksum leaves the new archive beside the old checksum, and says so. The unused upstream nested
submodules of third_party/libs/nativejson-benchmark are omitted, never checked out; its own
tracked sources, benchmark data and licence are included. All other nested submodules are refused.

Exit 0 when nothing is wrong; 1 with each fault on a line of its own, `<command>: <fault>`; 2 on a
usage error, when a file it reads is not there, cannot be read or is not UTF-8, when a path git
Expand Down Expand Up @@ -301,7 +305,11 @@ def region_of(version: Version, notes: changelog.Notes) -> tuple[str, str]:
def is_checkout(root: Path, library: str) -> bool:
"""Whether libs/<library> is a git checkout of its own, rather than a directory whose git
commands would reach the superproject's."""
directory = root / 'libs' / library
return repository_checkout(root / 'libs' / library)


def repository_checkout(directory: Path) -> bool:
"""Whether directory is a Git checkout of its own, including an initialized submodule."""
completed = subprocess.run(['git', '-C', str(directory), 'rev-parse', '--show-toplevel'],
capture_output=True, text=True, check=False)
return completed.returncode == 0 and \
Expand Down Expand Up @@ -380,9 +388,11 @@ def state_findings(root: Path, version: Version, notes: changelog.Notes,
if notes.compilers is None:
if not notes.preparing:
findings.append(f'{relative}: Compilers tested is None., and the version is frozen')
elif notes.compilers != lanes:
elif not notes.compilers or notes.compilers != [lane for lane in lanes
if lane in notes.compilers]:
findings.append(f'{relative}: Compilers tested lists {", ".join(notes.compilers)}, and '
f'the CI\'s lanes are {", ".join(lanes)}')
f'must list a nonempty ordered subset of the CI\'s lanes: '
f'{", ".join(lanes)}')
if not notes.preparing:
tagged = subprocess.run(['git', '-C', str(root), 'rev-parse', '-q', '--verify',
f'refs/tags/{version.tag}^{{commit}}'], capture_output=True,
Expand Down Expand Up @@ -738,16 +748,18 @@ def check_deflate() -> None:
"webcpp's archives are: run dist with a Python linked to zlib")


def blobs(directory: Path) -> tuple[list[tuple[str, str, str]], list[str]]:
def blobs(directory: Path, *paths: str) -> tuple[list[tuple[str, str, str]], dict[str, str]]:
"""The tree at HEAD of the repository directory: each blob's path, git mode and object, and
each gitlink's path. A path that is not UTF-8 is Broken, named."""
listed = subprocess.run(['git', '-C', str(directory), 'ls-tree', '-r', '-z', 'HEAD'],
each gitlink's path and pinned commit, optionally limited to paths. A path that is not UTF-8
is Broken, named."""
listed = subprocess.run(['git', '-C', str(directory), 'ls-tree', '-r', '-z', 'HEAD', '--',
*paths],
capture_output=True, check=False)
if listed.returncode != 0:
error = listed.stderr.decode(errors='replace').strip()
raise Broken(f'git ls-tree in {directory}: {error}')
found = []
links = []
links = {}
for entry in listed.stdout.split(b'\0'):
if not entry:
continue
Expand All @@ -760,7 +772,7 @@ def blobs(directory: Path) -> tuple[list[tuple[str, str, str]], list[str]]:
if kind == 'blob':
found.append((path, mode, name))
elif kind == 'commit':
links.append(path)
links[path] = name
return found, links


Expand Down Expand Up @@ -800,9 +812,33 @@ def pages(current: list[str]) -> list[str]:


def repositories(root: Path, names: list[str]) -> list[tuple[str, Path]]:
"""The superproject and the libraries names, each with the prefix of its paths in the
superproject."""
return [('', root)] + [(f'libs/{name}/', root / 'libs' / name) for name in names]
"""The superproject, libraries and checked-out source submodules, with their path prefixes.
dist validates every checkout and pin before reading any submodule's blobs."""
return ([('', root)] + [(f'libs/{name}/', root / 'libs' / name) for name in names] +
[(f'{path}/', root / path) for path in source_submodules(root)
if repository_checkout(root / path)])


def source_submodules(root: Path) -> dict[str, str]:
"""Supported root source submodules and their pinned commits: site and direct dependencies
under third_party/libs. Other gitlinks must be refused, never silently omitted."""
recorded = blobs(root, 'site', 'third_party/libs/')[1]
return {path: commit for path, commit in recorded.items() if not hidden(path) and
(path == 'site' or PurePosixPath(path).parent == PurePosixPath('third_party/libs'))}


def source_checkout_findings(root: Path, sources: dict[str, str]) -> list[str]:
"""A source dependency must be checked out at the exact commit recorded by the root."""
findings = []
for path, recorded in sources.items():
if not repository_checkout(root / path):
findings.append(f'{path} is not checked out: git submodule update --init {path}')
else:
checked_out = git(root / path, 'rev-parse', 'HEAD').strip()
if checked_out != recorded:
findings.append(f'{path} is at {checked_out}, and the superproject records '
f'{recorded}')
return findings


def utf8(data: bytes) -> bool:
Expand Down Expand Up @@ -832,14 +868,18 @@ def link_refusal(path: str, target: bytes) -> str | None:

def repository_refusals(root: Path, names: list[str]) -> list[str]:
"""What the superproject's tree and those of the libraries names hold that the archive cannot:
a submodule other than the libraries' own, libs/<name>, which it does not archive; a link
that link_refusal refuses."""
an unsupported root or nested submodule; a link that link_refusal refuses. Only the unused
nested dependencies of nativejson-benchmark are intentionally omitted (chapter 2)."""
refusals = []
sources = source_submodules(root)
for base, directory in repositories(root, names):
files, submodules = blobs(directory)
for path in submodules:
if not base and PurePosixPath(path).parent == PurePosixPath('libs'):
continue
if (not base and path in sources) or base == \
'third_party/libs/nativejson-benchmark/':
continue
owner = base.rstrip('/') or 'the superproject outside libs/'
refusals.append(f'{base}{path} is a submodule of {owner}, which dist does not archive')
links = [(path, name) for path, mode, name in files
Expand Down Expand Up @@ -873,11 +913,19 @@ def dist_refusals(root: Path, version: Version) -> list[str]:
superproject records; a submodule or a link the archive cannot hold; a page not built, or a
file beside the pages."""
current = libraries(root)
uncommitted = uncommitted_findings(root, current)
if uncommitted:
return uncommitted
sources = source_submodules(root)
dirty = uncommitted_findings(root, current)
for path in sources:
if repository_checkout(root / path):
dirty += [f'{path}/{changed} is not committed: a tag carries only what HEAD '
'records' for changed in uncommitted(root / path)]
if dirty:
return sorted(dirty)
refusals = version_findings(root, version)
refusals += checkout_findings(root, current, gitlinks(root, 'HEAD'))
refusals += source_checkout_findings(root, sources)
if refusals:
return refusals
refusals += repository_refusals(root, [name for name in current if is_checkout(root, name)])
refusals += page_refusals(root, current)
return refusals
Expand Down
Loading