Skip to content

Figure out how to re-use trusted setup across builds #13

@acolytec3

Description

@acolytec3

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions