Inline WASM in @nucypher/nucypher-core NPM package#83
Inline WASM in @nucypher/nucypher-core NPM package#83piotr-roslaniec merged 6 commits intonucypher:mainfrom
@nucypher/nucypher-core NPM package#83Conversation
Codecov Report
@@ Coverage Diff @@
## main #83 +/- ##
=======================================
Coverage 23.45% 23.45%
=======================================
Files 18 18
Lines 3521 3521
=======================================
Hits 826 826
Misses 2695 2695 |
manumonti
left a comment
There was a problem hiding this comment.
LGTM! 🙌
I think this is a great progress to have a more user-friendly environment to be used by adopters.
Some thoughts fwiw: What could be the cost of keeping the two approaches? Does it involve duplicate work when updating the WASM packages? If you ask me, my opinion is that is better to keep it simple with only one approach. But I’m not sure about the implications of deprecating the current approach for current adopters. |
We would only use the new approach when publishing an npm package. We could keep the "legacy" approach as a reference for someone wanting to build a non-inlined package. |
How much work would it take someone you used the previous packaging process, to use this updated one? Is it relatively simple once the steps are known? New tooling? Should this process (migration from prior packaging) be documented alongside fresh (only this new) usage? |
It only requires calling
We can document it in a changelog. |
|
I found an issue caused by the changes in this PR: test runners (like |
a4b23cc to
0c617c8
Compare
0c617c8 to
1f8ed5f
Compare
|
Because of the inlining the size of
|
Moreover, it makes sense for this to be our public stance in general with regard to this repo (and perhaps to finally examine whether we want to call it 'core' rather than something like 'nucypher-base'). |
Co-authored-by: David Núñez <david@nucypher.com>

Type of PR:
Required reviews:
What this does:
rollupbased NPM package bundler in the./nucypher-core-wasm-bundlerdirectory@nucypher/nucypher-corepackage. Now, said package can be used without a WASM-aware bundler.Issues fixed/closed:
nucypher-core#85Why it's needed:
@nucypher/nucypher-coreNotes for reviewers:
@nucypher/nucypher-coreusers who relied on the previous packaging and WASM module instantiating methods../nucypher-core-wasm-bundlercould end up in the./nucypher-core-wasmdirectory, however, I think the current packaging setup in./nucypher-core-wasmis worth preserving. We could either document the two distinct approaches or merge them. TBD.package.jsonexports. Similarly, we could offer anode-friendly "slim" build. Seerollup.config.jsfor details. However, these two changes require further research that I can't afford now. I opted to ship these changes earlier at a cost of less flexibility for our users.