{"_id":"blake3-jit","_rev":"4-4e26e57659b2f9fb7f88a15791f14f08","name":"blake3-jit","dist-tags":{"latest":"1.1.1"},"versions":{"0.0.0":{"name":"blake3-jit","version":"0.0.0","keywords":["blake3","hash","crypto","simd","wasm","fast"],"author":{"name":"LongYinan","email":"github@lyn.one"},"license":"MIT","_id":"blake3-jit@0.0.0","maintainers":[{"name":"broooooklyn","email":"lynweklm@gmail.com"}],"dist":{"shasum":"849e70db10e2f859007020b5d2f93198052599a3","tarball":"https://registry.npmjs.org/blake3-jit/-/blake3-jit-0.0.0.tgz","fileCount":6,"integrity":"sha512-2MtrbDI1PGNTk0sT9gYjmPCpkPqkI0Pcg+Rw9tpbKbH5cZfJ3TsbztzXGYaC1v28X0h6E2bIL16KLGBesYlxqw==","signatures":[{"sig":"MEQCIGVP8gqIbfpWISL9etvwEMHiQuNmmoSQ6RGTgC2zVoLXAiBH3//1ChZ0wBrDd0bnqybNYM1fbOIzg3RRcBw5q5u3ow==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":286069},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","funding":{"url":"https://github.com/sponsors/Brooooooklyn","type":"github"},"gitHead":"09b6ad0e1223138343864f1bd96e36179d5f44c7","scripts":{"lint":"oxlint --type-aware .","test":"vitest run","bench":"oxnode bench/benchmark.ts","build":"rolldown -c rolldown.config.js","format":"oxfmt","typecheck":"tsc -p tsconfig.json"},"_npmUser":{"name":"broooooklyn","email":"lynweklm@gmail.com"},"_npmVersion":"11.6.2","description":"The pure JavaScript BLAKE3 implementation with runtime WASM SIMD","directories":{},"sideEffects":false,"_nodeVersion":"24.11.1","_hasShrinkwrap":false,"packageManager":"yarn@4.12.0","devDependencies":{"oxfmt":"^0.17.0","oxlint":"^1.32.0","vitest":"^4.0.15","rolldown":"1.0.0-beta.53","typescript":"^5.9.3","@types/node":"^24.10.2","@oxc-node/cli":"^0.0.35","oxlint-tsgolint":"^0.8.4","@napi-rs/blake-hash":"1.3.6","rolldown-plugin-dts":"^0.18.3"},"_npmOperationalInternal":{"tmp":"tmp/blake3-jit_0.0.0_1765380239820_0.6448184843153089","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"blake3-jit","version":"1.0.0","keywords":["blake3","hash","crypto","simd","wasm","fast"],"author":{"name":"LongYinan","email":"github@lyn.one"},"license":"MIT","_id":"blake3-jit@1.0.0","maintainers":[{"name":"broooooklyn","email":"lynweklm@gmail.com"}],"homepage":"https://github.com/Brooooooklyn/blake3-jit#readme","bugs":{"url":"https://github.com/Brooooooklyn/blake3-jit/issues"},"dist":{"shasum":"e98dafa7ddd6be62e1ddd9dcf0ec2051523bb8eb","tarball":"https://registry.npmjs.org/blake3-jit/-/blake3-jit-1.0.0.tgz","fileCount":6,"integrity":"sha512-0Ulza5lYejLqATjvLKlNlsEbDGclbN4bbPzAImemeApmnihTf9ERQOQg018hpKw2xbrweT/1WEZ0OEeFkvjhuQ==","signatures":[{"sig":"MEYCIQDbG2YhkmbB7bxuUYa/x3yEkW27+lP7vrPrL6yYqxL09AIhAKasDUufrQ3GVAUANhygYKfJ0SkXbDYUCNANDSMp67fH","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/blake3-jit@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":286175},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","funding":{"url":"https://github.com/sponsors/Brooooooklyn","type":"github"},"gitHead":"d6959c8106abbb1346deeb052bc0f09c028ca78c","scripts":{"lint":"oxlint --type-aware .","test":"vitest run","bench":"oxnode bench/benchmark.ts","build":"rolldown -c rolldown.config.js","format":"oxfmt","typecheck":"tsc -p tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:965eddab-cd1a-478c-9376-e23f505b60e9"}},"repository":{"url":"git+https://github.com/Brooooooklyn/blake3-jit.git","type":"git"},"_npmVersion":"11.7.0","description":"The pure JavaScript BLAKE3 implementation with runtime WASM SIMD","directories":{},"sideEffects":false,"_nodeVersion":"24.11.1","_hasShrinkwrap":false,"packageManager":"yarn@4.12.0","devDependencies":{"oxfmt":"^0.17.0","oxlint":"^1.32.0","vitest":"^4.0.15","rolldown":"1.0.0-beta.53","typescript":"^5.9.3","@types/node":"^24.10.2","@oxc-node/cli":"^0.0.35","oxlint-tsgolint":"^0.8.4","@napi-rs/blake-hash":"1.3.6","rolldown-plugin-dts":"^0.18.3"},"_npmOperationalInternal":{"tmp":"tmp/blake3-jit_1.0.0_1765381184080_0.4902385856741063","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"blake3-jit","version":"1.1.0","keywords":["blake3","crypto","fast","hash","simd","wasm"],"author":{"name":"LongYinan","email":"github@lyn.one"},"license":"MIT","_id":"blake3-jit@1.1.0","maintainers":[{"name":"broooooklyn","email":"lynweklm@gmail.com"}],"homepage":"https://github.com/Brooooooklyn/blake3-jit#readme","bugs":{"url":"https://github.com/Brooooooklyn/blake3-jit/issues"},"dist":{"shasum":"bad8d86d0fb658847824b69c777bb9c7a9418047","tarball":"https://registry.npmjs.org/blake3-jit/-/blake3-jit-1.1.0.tgz","fileCount":6,"integrity":"sha512-5lNvUdIw2roA6LSV39E1mDXN8WVK8kC0dGZtaZoErkVktSgUjgRueTv4WVqHIUMHGerkfhxBuqFtMNuo/GdLrA==","signatures":[{"sig":"MEYCIQCInZFVVHP50AvmIApQkoz/r5gAu+sSamzI364d8tNZqwIhAOYQ/PuHXu8sCDscWRsi3HnPZoTudQSFJFchKCV9sj+S","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/blake3-jit@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":286033},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","funding":{"url":"https://github.com/sponsors/Brooooooklyn","type":"github"},"gitHead":"f683aa76fa4dc5d87f3c54126fef75ddc9cd953e","scripts":{"lint":"oxlint --type-aware .","test":"vitest run","bench":"oxnode bench/benchmark.ts","build":"rolldown -c rolldown.config.js","format":"oxfmt","typecheck":"tsc -p tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:965eddab-cd1a-478c-9376-e23f505b60e9"}},"repository":{"url":"git+https://github.com/Brooooooklyn/blake3-jit.git","type":"git"},"_npmVersion":"11.12.1","description":"The pure JavaScript BLAKE3 implementation with runtime WASM SIMD","directories":{},"sideEffects":false,"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"packageManager":"yarn@4.14.1","devDependencies":{"oxfmt":"^0.45.0","oxlint":"^1.36.0","vitest":"^4.0.16","rolldown":"1.0.0-rc.16","typescript":"^6.0.0","@types/node":"^25.0.3","@oxc-node/cli":"^0.1.0","oxlint-tsgolint":"^0.21.0","@napi-rs/blake-hash":"1.3.6","rolldown-plugin-dts":"^0.23.0","@huggingface/blake3-wasm":"^0.0.4"},"_npmOperationalInternal":{"tmp":"tmp/blake3-jit_1.1.0_1776422150845_0.5834064360340769","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"_id":"blake3-jit@1.1.1","bugs":{"url":"https://github.com/Brooooooklyn/blake3-jit/issues"},"dist":{"shasum":"83b1a625ad6e02a0dd6648a468448530131b46da","tarball":"https://registry.npmjs.org/blake3-jit/-/blake3-jit-1.1.1.tgz","fileCount":6,"integrity":"sha512-RMR8UTrdhjv9SpR9AtNMqIakyJUKkqj+qj05IA8kRjStJPzNYu4s6PW/RUVd88xiUI1df2gDwA/JGjj/3Ce8eA==","signatures":[{"sig":"MEUCIG1Rm8rFUsX1sn6nT9DgV3gpU3XzFRmTRLC2iyMZHIA/AiEArWevJiGNx0SZ2tSwD9W61is25KGlq97FwSzTFLBo1E0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD3rZMLEBJUt7ae3mVSOwsX7FifBRvMMD9e/XQf6161mAIgD71BXGlBX9Y0sFatgw16Eqm1Ud+rZbhA3mb9Umt2rbM="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/blake3-jit@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":293440},"main":"./dist/index.js","name":"blake3-jit","type":"module","types":"./dist/index.d.ts","author":{"name":"LongYinan","email":"github@lyn.one"},"funding":{"url":"https://github.com/sponsors/Brooooooklyn","type":"github"},"gitHead":"0334cb0a1c657600783c9fe1c4f7f235a42bae87","license":"MIT","scripts":{"lint":"oxlint --type-aware .","test":"vitest run","bench":"oxnode bench/benchmark.ts","build":"rolldown -c rolldown.config.js","format":"oxfmt","typecheck":"tsc -p tsconfig.json"},"version":"1.1.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"965eddab-cd1a-478c-9376-e23f505b60e9"}},"homepage":"https://github.com/Brooooooklyn/blake3-jit#readme","keywords":["blake3","crypto","fast","hash","simd","wasm"],"repository":{"url":"git+https://github.com/Brooooooklyn/blake3-jit.git","type":"git"},"_npmVersion":"12.2.2","description":"The pure JavaScript BLAKE3 implementation with runtime WASM SIMD","directories":{},"maintainers":[{"name":"broooooklyn","email":"lynweklm@gmail.com"}],"sideEffects":false,"_nodeVersion":"26.13.1","_hasShrinkwrap":false,"packageManager":"yarn@4.18.1","devDependencies":{"vite":"^8.3.0","oxfmt":"^0.78.0","oxlint":"^1.36.0","vitest":"^5.0.0","rolldown":"1.3.2","typescript":"^7.0.0","@types/node":"^26.0.0","@oxc-node/cli":"^1.0.0","oxlint-tsgolint":"^7.0.0","@napi-rs/blake-hash":"1.4.0","rolldown-plugin-dts":"^0.30.0","@huggingface/blake3-wasm":"^0.0.4"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/blake3-jit_1.1.1_1794712741241_0.11406921467191955"}}},"time":{"created":"2025-12-10T15:23:59.819Z","modified":"2026-11-15T03:19:01.705Z","0.0.0":"2025-12-10T15:23:59.968Z","1.0.0":"2025-12-10T15:39:44.233Z","1.1.0":"2026-04-17T10:35:51.103Z","1.1.1":"2026-11-15T03:19:01.353Z"},"bugs":{"url":"https://github.com/Brooooooklyn/blake3-jit/issues"},"author":{"name":"LongYinan","email":"github@lyn.one"},"license":"MIT","homepage":"https://github.com/Brooooooklyn/blake3-jit#readme","keywords":["blake3","crypto","fast","hash","simd","wasm"],"repository":{"url":"git+https://github.com/Brooooooklyn/blake3-jit.git","type":"git"},"description":"The pure JavaScript BLAKE3 implementation with runtime WASM SIMD","maintainers":[{"name":"broooooklyn","email":"lynweklm@gmail.com"}],"readme":"# blake3-jit\n\n[![CI](https://github.com/Brooooooklyn/blake3-jit/actions/workflows/ci.yml/badge.svg)](https://github.com/Brooooooklyn/blake3-jit/actions/workflows/ci.yml)\n\nHigh-performance BLAKE3 implementation with runtime JIT WASM SIMD.\n\n## Features\n\n- **1.38 GB/s** peak throughput on large inputs\n- **Pure JS + JIT WASM SIMD** - no `.wasm` files to ship\n- All BLAKE3 modes: hash, keyed (MAC), derive_key\n- XOF (eXtendable Output Function) support\n- Zero dependencies, tree-shakeable\n\n## Installation\n\n```bash\nnpm install blake3-jit\n```\n\n## Usage\n\n```typescript\nimport { hash, createHasher, createKeyed, createDeriveKey } from \"blake3-jit\";\n\n// One-shot hashing\nconst digest = hash(new Uint8Array([1, 2, 3]));\n\n// Incremental hashing\nconst hasher = createHasher();\nhasher.update(chunk1);\nhasher.update(chunk2);\nconst result = hasher.finalize();\n\n// Keyed hashing (MAC)\nconst mac = createKeyed(key).update(message).finalize();\n\n// Key derivation\nconst derived = createDeriveKey(\"my-app v1\").update(material).finalize(32);\n```\n\n## API\n\n### One-shot Functions\n\n```typescript\nhash(input: Uint8Array, outputLength?: number): Uint8Array\nhashInto(input: Uint8Array, output: Uint8Array, outputLength?: number): void\n```\n\n### Incremental Hashing\n\n```typescript\ncreateHasher(): Hasher\ncreateKeyed(key: Uint8Array): Hasher    // 32-byte key for MAC\ncreateDeriveKey(context: string): Hasher // Key derivation\n\nclass Hasher {\n  update(data: Uint8Array): this\n  finalize(outputLength?: number): Uint8Array\n  finalizeXof(): XofReader\n}\n\nclass XofReader {\n  read(length: number): Uint8Array\n}\n```\n\n### SIMD Control\n\n```typescript\nwarmupSimd(): boolean  // Pre-initialize WASM SIMD\n```\n\n## Architecture\n\n```\nblake3-jit\n├── JS Path (<4KB)      Pure JavaScript, SMI-optimized compress\n└── WASM SIMD (>=4KB)   4-way parallel, JIT-generated at runtime\n    ├── compress4x      Single block x 4 chunks\n    ├── compressChunks4x 16 blocks x 4 chunks batched\n    └── compressParent   Merkle tree merges\n```\n\n**Key optimizations:**\n\n- SMI variables force V8 32-bit integer ALU\n- Arena pattern: all buffers in WASM linear memory (zero GC)\n- Runtime WASM codegen eliminates `.wasm` file dependency\n\n## Benchmarks\n\nCompared against native Rust (`@napi-rs/blake-hash`):\n\n| Size | blake3-jit | @napi-rs  | Notes           |\n| ---- | ---------- | --------- | --------------- |\n| 96B  | 362 MB/s   | 149 MB/s  | **2.4x faster** |\n| 512B | 748 MB/s   | 521 MB/s  | **1.4x faster** |\n| 1KB  | 811 MB/s   | 701 MB/s  | **1.2x faster** |\n| 32KB | 1.36 GB/s  | 1.97 GB/s | native wins     |\n| 1MB  | 1.38 GB/s  | 2.06 GB/s | native wins     |\n\n**Pure JS beats native Rust for small inputs** due to FFI overhead.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}