-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(hasher): add blake3 #395
Conversation
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the ipfs-webui issue could be related to vite's build process not pulling in wasm dependencies?
src/lib/hash-importer.ts
Outdated
encode: async (data: Uint8Array): Promise<Uint8Array> => { | ||
const { digest } = await blake3Digest(data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could pull the import down into this so we only import this library dynamically when we need it, and add as a peer/optional/optionalPeer. That may solve the ipfs-webui issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done and Done, however I didn't test the wasm issue.
|
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Plus some minor changes
* feat(blake3): ➕ Adding blake3-multihash Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(blake3): 👔 Adding blake3 hasher Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: ♻️ Addressing comments Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: 🔀 Marking dep as peerDep Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
## [5.1.0](v5.0.0...v5.1.0) (2023-11-30) ### Features * **hasher:** add blake3 ([#395](#395)) ([6ea74e5](6ea74e5))
Fixes: #394
In this PR:
@SgtPooki when trying to build ipfs-webui locally with this, it fails:
The error generates from here: https://github.com/web3-storage/blake3-multihash/blob/main/gen/wasm.js#L231 any ideas on how to test this?