feat!: native-first API refactor, WASM behind feature flag

BREAKING: native functions return [u8; 32] instead of Vec<u8>.
BREAKING: WASM bindings require `wasm` feature flag.
New Blake3Error type replaces JsError for native consumers.
This commit is contained in:
2026-04-28 06:05:57 +02:00
parent 4570d6826f
commit 230976664c
7 changed files with 211 additions and 71 deletions
+6 -4
View File
@@ -1,12 +1,12 @@
[package]
name = "blake3-wasm-rs"
version = "0.5.2"
version = "0.6.0"
edition = "2024"
license = "MIT OR Apache-2.0"
authors = ["Thomas <[email protected]>"]
publish = false
repository = "https://github.com/UneBaguette/blake3.wasm"
description = "Simple blake3 to wasm project"
description = "BLAKE3 hashing with optional WASM bindings"
keywords = ["blake3", "wasm", "hash", "cryptography", "wasm-bindgen"]
categories = ["cryptography", "wasm"]
@@ -14,11 +14,13 @@ categories = ["cryptography", "wasm"]
crate-type = ["cdylib", "rlib"]
[features]
default = []
wasm = ["dep:wasm-bindgen"]
talc = ["dep:talc"]
[dependencies]
blake3 = { version = "1.8", features = ["wasm32_simd"] }
wasm-bindgen = "=0.2.118"
blake3 = { version = "1", features = ["wasm32_simd"] }
wasm-bindgen = { version = "=0.2.118", optional = true }
[dev-dependencies]
wasm-bindgen-test = "0.3"