5 Commits
Author SHA1 Message Date
breakingbread 8480a9136b chore: migrate version in cargo.toml and bump version in package.json build.sh 2026-04-23 14:30:00 +02:00
Paul MillerandGitHub 69eab8091d readme: add awasm-noble entry (#1)
The `@awasm/noble/wasm_threads.js` target works without any additional setup in node.js. It can be used as-is.

Same goes for browsers. Web workers are managed automatically, without any input from user.

This is very different from most threaded libraries which require user to set up their own threading infra.
2026-04-22 23:07:10 +02:00
breakingbread dda079279f docs: add shields badges 2026-04-22 19:08:40 +02:00
breakingbread a5c9a0c18d fix: copy README after pkg dir exists 2026-04-22 18:58:26 +02:00
breakingbread bcd603bf4b fix: include README in npm package 2026-04-22 18:54:37 +02:00
4 changed files with 33 additions and 13 deletions
Generated
+1 -1
View File
@@ -47,7 +47,7 @@ dependencies = [
[[package]]
name = "blake3-wasm-rs"
version = "0.1.1"
version = "0.1.2"
dependencies = [
"blake3",
"wasm-bindgen",
+5 -3
View File
@@ -1,8 +1,10 @@
[package]
name = "blake3-wasm-rs"
version = "0.1.1"
version = "0.1.2"
edition = "2024"
license = "MIT"
authors = ["UneBaguette <[email protected]>"]
publish = false
repository = "https://github.com/UneBaguette/blake3.wasm"
description = "Simple blake3 to wasm project"
keywords = ["blake3", "wasm", "hash", "cryptography", "wasm-bindgen"]
@@ -12,8 +14,8 @@ categories = ["cryptography", "wasm"]
crate-type = ["cdylib", "rlib"]
[dependencies]
blake3 = { version = "1.8.4", features = ["wasm32_simd"] }
wasm-bindgen = "0.2.118"
blake3 = { version = "1.8", features = ["wasm32_simd"] }
wasm-bindgen = "0.2"
[dev-dependencies]
wasm-bindgen-test = "0.3"
+22 -7
View File
@@ -1,5 +1,10 @@
# blake3 to wasm
[![npm version](https://img.shields.io/npm/v/blake3-wasm-rs)](https://www.npmjs.com/package/blake3-wasm-rs)
[![CI](https://github.com/UneBaguette/blake3.wasm/actions/workflows/ci.yml/badge.svg)](https://github.com/UneBaguette/blake3.wasm/actions/workflows/ci.yml)
[![license](https://img.shields.io/npm/l/blake3-wasm-rs)](https://github.com/UneBaguette/blake3.wasm/blob/master/LICENSE)
[![npm downloads](https://img.shields.io/npm/dm/blake3-wasm-rs)](https://www.npmjs.com/package/blake3-wasm-rs)
**blake3.wasm** is a WebAssembly port of the BLAKE3 cryptographic hash function written in **Rust**. It enables fast and secure hashing right inside **browsers** and **Node.js**.
## build
@@ -70,15 +75,25 @@ h.finalize()
## Benchmarks
Tested on **Apple M4**, Node.js v24.
| Size | @noble/hashes | awasm-noble | awasm-noble (threads) | blake3-wasm |
|-------|---------------|-------------|-----------------------|-------------|
| 32 B | 28 MB/s | 105 MB/s | 94 MB/s | 129 MB/s |
| 1 KB | 105 MB/s | 843 MB/s | 819 MB/s | 568 MB/s |
| 64 KB | 102 MB/s | 1,898 MB/s | 1,855 MB/s | 2,004 MB/s |
| 1 MB | 101 MB/s | 1,943 MB/s | 4,711 MB/s | 1,893 MB/s |
| 10 MB | 101 MB/s | 1,911 MB/s | 6,456 MB/s | 2,185 MB/s |
Tested on **Ryzen 7 5800X**, Node.js v24.
| Size | @noble/hashes | awasm-noble | blake3-wasm |
|-------|---------------|-------------|-------------|
| 32 B | 11 MB/s | 34 MB/s | 81 MB/s |
| 1 KB | 60 MB/s | 360 MB/s | 781 MB/s |
| 64 KB | 49 MB/s | 1,518 MB/s | 2,004 MB/s |
| 1 MB | 51 MB/s | 1,671 MB/s | 1,893 MB/s |
| 10 MB | 51 MB/s | 1,572 MB/s | 1,812 MB/s |
| Size | @noble/hashes | awasm-noble | awasm-noble (threads) | blake3-wasm |
|-------|---------------|-------------|-----------------------|-------------|
| 32 B | 11 MB/s | 34 MB/s | 45 MB/s | 70 MB/s |
| 1 KB | 56 MB/s | 499 MB/s | 526 MB/s | 885 MB/s |
| 64 KB | 52 MB/s | 1,729 MB/s | 1,684 MB/s | 2,037 MB/s |
| 1 MB | 51 MB/s | 1,550 MB/s | 4,036 MB/s | 1,829 MB/s |
| 10 MB | 50 MB/s | 1,497 MB/s | 4,946 MB/s | 1,877 MB/s |
## Security
+5 -2
View File
@@ -17,6 +17,8 @@ wasm-pack build --target web -d "$ROOT/web"
echo "Generating node-esm wrapper..."
mkdir -p "$ROOT/node-esm"
cp README.md "$ROOT/README.md"
# Extract export names from the nodejs .js file
EXPORTS=$(grep -oP '(?<=module\.exports\.)\w+' "$ROOT/node/blake3_wasm_rs.js" | sort -u || true)
@@ -51,7 +53,7 @@ rm -f "$ROOT/bundler/.gitignore" "$ROOT/node/.gitignore" "$ROOT/web/.gitignore"
cat > "$ROOT/package.json" << 'EOF'
{
"name": "blake3-wasm-rs",
"version": "0.2.0",
"version": "0.2.2",
"description": "BLAKE3 hashing via Rust/WASM - works in Node.js (CJS + ESM), browsers, and bundlers",
"license": "MIT",
"repository": {
@@ -73,7 +75,8 @@ cat > "$ROOT/package.json" << 'EOF'
"node/",
"node-esm/",
"bundler/",
"web/"
"web/",
"README.md"
],
"keywords": [
"blake3",