Minimal wrapper around the official BLAKE3 hash function for browser use. No pre-built WASM is committed — auditors build from source.
build.sh(~80 lines) — clones BLAKE3 at tag1.8.3(pinned), scaffolds two tiny Rust crates, builds withwasm-pack, cleans upblake3-wasm-single/src/lib.rs— 7 lines: callsblake3::hash()and returns bytesblake3-wasm-rayon/src/lib.rs— 22 lines: usesblake3::Hasherwithupdate_rayon()for parallel hashing above 16 KB- Run
./build.sh(or.\build.ps1on Windows) to build from source - All Cargo.toml, config, and source files are generated by the build script — nothing hidden
# Linux/macOS
chmod +x build.sh
./build.sh
# Windows (PowerShell)
.\build.ps1After building, serve the directory and open browser-test.html:
python -m http.server 8080
# Open http://localhost:8080/browser-test.htmlDrop a file to compare BLAKE3 (WASM) vs SHA-256 (WebCrypto) throughput.
- If SharedArrayBuffer is available: parallel mode (4 threads)
- Otherwise: single-threaded SIMD fallback
blake3-wasm-single/pkg/ — single-threaded WASM module
blake3-wasm-rayon/pkg/ — parallel (rayon) WASM module
Both are gitignored. Build from source to verify.
| Decision | Rationale |
|---|---|
| No pre-built WASM | Auditors build from source to verify nothing is tampered |
| Build script generates all config | Only build.sh + build.ps1 to audit |
| Pin BLAKE3 at tag 1.8.3 | Reproducible builds; matches crates.io |
| Two builds (single + rayon) | browser-test.html auto-falls back; both wrappers are tiny |
| Rayon uses nightly-2025-11-15 | Required for build-std with atomics/shared-memory |