JSPM

blake3-node-neon-no-package

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q21157F
  • License MIT

Exposing the blake3 library as a node module buildable with neon and WASM for the browser

Package Exports

  • blake3-node-neon-no-package
  • blake3-node-neon-no-package/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (blake3-node-neon-no-package) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

blake3-node-neon-no-package

  • Expose blake3 to node modules.
  • Expose blake3 to browser contexts.

This implementation referes to the Rust crate for blake3.

The main reason for this version:

Minimal packaging of code

It may be desirable to use blake3 hashing in upstream modules, such as crypto-wraps or ucwid. But, there is a desire to keep those modules fairly lean. The basic version of those modules do not have dependencies outside of their execution contexts. Node.js provides crypto.subtle and so does the browser. But, crypto.subtle does not included some of the newer hashes and ciphers.

Some of the JavaScript packages for including these newer hashes and ciphers use extensive packaging libraries. That too, and they are not necessarily being maintained.

Install

For node and browser:

npm install blake3-node-neon-no-package --save

For the browser, bring the assets up with get-nmp-assets.

$npm install -g get-npm-assets
$get-npm-assets blake3-node-neon-no-package
$ls ./assets

The output should list a wasm file for use in the browser.

Usage

Associated modules

Build

web

cargo build --release --target=wasm32-unknown-unknown

node