Skip to content

Explore the size reduction of Emscripten shared objects #49

Description

@agriyakhetarpal

There are a bunch of tools we could run over the object files in wheels for this, but wasm-opt and wasm-dce come up in search results in the first go. I don't know enough about how to do this, so I'm documenting some resources here for our reference.

Otherwise, I'm sure we are building everything in release mode, LTO, etc. and use only the required amount of INITIAL_MEMORY already. Build backends are not always responsible for stripping away binary information, and while some do support calling strip over the .so files (scikit-build-core, for one), I don't know if they are aware of Emscripten-specific tools for this.

Other ways to reduce binary size at build time (install tags, better support build backend tooling, etc.) are best covered in pyodide-build, not here – we are concerned about what happens after build time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions