Skip to content

hash: webcpp::hash increment 1, its third-party code, its build and its rulebook - #21

Merged
pinhopro merged 47 commits into
mainfrom
hash/v0.1
Nov 16, 2026
Merged

pinhopro merged 47 commits into
mainfrom
hash/v0.1

Conversation

@pinhopro

Copy link
Copy Markdown
Contributor

Summary

The superproject's half of webcpp::hash increment 1 (proposal hash genesis, plan Tasks 0-24):
the three C libraries hash builds from source, their targets, hash's tools (Jamfile fixtures,
the measure lane, the generated guide tables), the rulebook, and the submodule libs/hash at
the head of webcpporg/hash's pull request.

This branch is stacked on crypto/v0.1 (webcpp::crypto 0.1): its base is that branch until
crypto's pull request merges, then main. After this one merges, webcpporg/hash's pull request
is re-run against the new main and merged by fast-forward.

What changes

  • Submodules (chapter 10 rows; the owner's decision G3 of 2026-11-14):
    third_party/libs/xkcp (d20c8fc), third_party/libs/libsodium (1.0.22),
    third_party/libs/blake3 (1.8.7); libs/hash (../hash.git).
  • third_party/Jamfile: XKCP's Keccak-p[1600] with hash's adapter and canary; libsodium
    built file by file with its canary (MSVC's inline, one fixed version.h, memory growth on
    Emscripten); BLAKE3's C implementation, portable on WebAssembly and dispatched natively from a
    probe of the configured compiler; BearSSL carries hash's canary too; crypto's and hash's C
    libraries share one .c-sections block.
  • Tools: the user's Jamfiles of hash as fixtures, in one module shared with crypto's
    (tools/test/user_jamfiles.py, with every directive crypto added); every message of hash
    checked against its Emscripten fixture; the measure lane (measure.py, its CI setup and
    spec 4.2's order rule) and the generated tables (doc_tables.py, two comparison tables a
    chapter); webcpp.run's <webcpp-node-raw-fs>off; openssl_one_copy_test.py reads WASI link
    lines.
  • Lint: the native analysis of what a lane for every target also compiles natively, the
    twins without exceptions, em++-only commands, clang-tidy's forward-declaration check back on
    for the whole tree, the backend tags crypto and hash both name; hash opts into
    nodiscard results.
  • Documentation site: a stacked table's cells break an over-long word, and its caption is
    as wide as the table.
  • Rulebook: hash accepted in chapter 17, then its increment 1 and its three exceptions
    recorded; AGENTS.md names xkcp, libsodium and blake3; the release notes.

Verification

Local, from scratch (b2 -a), crypto and hash on one tree:

  • native 305 passed (crypto 152, hash 153), wasip2 291, wasip3 284, Emscripten 210, gcc-15 273,
    0 failed; c-suites 107 passed on native, wasip2, wasip3 and Emscripten; hash's measure lane
    ok; trystero native 52 and Emscripten 59;
  • amd64 Linux in the CI's docker image (gcc-14): 273 passed;
  • MSVC 14.3 and 14.5 at /W4 /WX in a local Wine-hosted lane that mirrors the CI's: its first run's
    findings are fixed. MSVC 14.3 verified locally on the final combined tree (nodiscard/v0.1 c510459,
    which holds this branch): 347 of 355 rows pass, the 8 left being the known Wine artifact
    (no-exceptions units that include Boost.JSON, which the Windows CI compiles), summarize.sh:
    "green but for the known Wine failures"; 14.5 is left to the Windows CI, since both versions gave
    identical results on every earlier local run;
  • b2 -a doc (both libraries' doc, table and rendered checks), matrix.py plan and own-lanes
    for crypto and hash, all 61 tools/**/*_test.py, the lint lint: clean (2265 compile
    commands).

Reviews: per-stream spec and quality reviews with fix rounds, a final review and its fix round,
and the rebase onto crypto's final branch with every lane run again and the rendered tables
checked at 390, 1199 and 1440 px.

Known limits

  • hash's measure lane may approach the own-lanes job's 60-minute timeout on the CI.
  • The measurements come from one loaded macOS arm64 machine; the native orders are not yet
    measured on Linux or Windows.
  • MSVC, Apple Clang and the Linux clang lanes first run on GitHub here.

Follow-ups

  • Spec amendments for the owner (hkdf_extract/hkdf_expand tags, OpenSSL's int limits,
    libsodium's Emscripten flag, the BLAKE3 suite run by c-suites rather than a script).
  • An idle re-measure, and per-platform orders if needed.
  • The nodiscard results rule's reading of T name(args); locals: fixed by nodiscard/v0.1,
    stacked on this branch.
  • The proposals' pull request recording increment 1 as implemented; the Boost.Hash2 keccak
    contribution (G5).

🤖 Generated with Claude Code

R added 30 commits November 16, 2026 10:46
…that mounts the host's directories under node
…version.h has one fixed place, and an unknown model stops
…he lint's form

The merge of the libsodium and BLAKE3 cases dropped the expectations of
the XKCP and libsodium cases, which left each unchecked and its variable
unread; two Jamfile literals of the libsodium cases are split under 100
columns.
… webcpp::hash checked against its Emscripten fixture
… was loaded, and where constant time was read
R added 17 commits November 16, 2026 10:46
…eptions, and the lint reads hash's canary pins
… plan's rulings, and a test fails on a cited ruling
….c-sections, defined once beside .gc

After the rebase onto crypto's final branch, .c-library and .hash-c-library each repeated the section and warning flags and the comment that explains them; both now add only their checkout check and canary include to .c-sections.
…chitecture block's test, which the rebase's join lost
Asciidoctor's table style keeps words whole (word-wrap: normal) and the page gave breaks back only to an AsciiDoc cell's content, so at 390px the compiler's commit in hash's measured tables ran past its row's frame. The phone's rules and the stacked box's mirror give td and th overflow-wrap: break-word.
…n tables, each under the eight columns from which a table scrolls
A table laid out as a block kept its caption a table caption, an anonymous table as narrow as its longest word: at 390px every caption of hash's page stood in a column of 68 to 116 px.
The library's repository is webcpporg/hash. The third-party targets compile its canaries, so the submodule lands with them in one pull request. The recorded commit becomes the library's main by a fast-forward once this merges.
…end's Argon2id output bound carries bugprone-branch-clone, which Linux's clang-tidy reads
@pinhopro
pinhopro changed the base branch from crypto/v0.1 to main November 16, 2026 14:10
@pinhopro
pinhopro merged commit 09ef246 into main Nov 16, 2026
2 of 20 checks passed
@pinhopro
pinhopro deleted the hash/v0.1 branch November 17, 2026 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant