Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Oct 16, 2025

This removes the special handling of exported immutable globals which simplifies the code in a few different ways.

For programs that export data addresses (this is relatively rare) this means codesize reduction for the generated JS (since it no longer contains the constant values) and the codesize increase for the Wasm binary (since it now contains extra exports).

The main reason for this is consistency with dynamic linking (where data exports are always needed) and a reduction in complexity.

Fixes: #25556

@sbc100 sbc100 requested a review from kripken October 16, 2025 14:33
@sbc100 sbc100 force-pushed the data_symbol_exports branch 2 times, most recently from 1808912 to d72fca6 Compare October 16, 2025 16:16
@sbc100 sbc100 force-pushed the data_symbol_exports branch 4 times, most recently from 6c1b746 to 2c3efc2 Compare October 18, 2025 21:18
@sbc100 sbc100 force-pushed the data_symbol_exports branch 5 times, most recently from b1f9e50 to 1eec49a Compare November 13, 2025 23:27
This removes the special handling of exported immutable globals which
simplifies the code in a few different ways.

For programs that export data addresses (this is relatively rare) this
means codesize reduction for the generated JS (since it no longer
contains the constant values) and the codesize increase for the Wasm
binary (since it now contains extra exports).

The main reason for this is consistency with dynamic linking (where data
exports are always needed) and a reduction in complexity.

Fixes: emscripten-core#25556
@sbc100 sbc100 force-pushed the data_symbol_exports branch from 1eec49a to 6465935 Compare November 14, 2025 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wasm global exports don't work with DECLARE_ASM_MODULE_EXPORTS=0

2 participants