-
Notifications
You must be signed in to change notification settings - Fork 1
Description
The current published version of kzg-wasm
duplicates the trusted_setup.js
file across all three build outputs since it's a Javascript object and requires either a CJS or ESM export style (i.e. module.exports
vs export ...
). This balloons the bundle size considerably and is really unnecessary.
Ideally, the trusted setup should be converted to something like binary, maybe stored in the the dist/wasm
directory alongside the WASM bundle, and then loaded in loadKZG
if no alternative trusted setup is provided. It's important that we don't introduce any other deps toward the aim of compressing this. If the trusted setup can't be compressed using either node builtins or browser APIs, we should just use raw binary. Even that should decrease the size of the overall module considerably.