emscripten-core / emscripten

Emscripten: An LLVM-to-WebAssembly Compiler
Other
25.91k stars 3.32k forks source link

Support source phase imports JS proposal #23047

Open sbc100 opened 1 day ago

sbc100 commented 1 day ago

The source phase imports proposal should allow us to simplify the emscripten-generated JS code significantly: https://github.com/tc39/proposal-source-phase-imports.

This proposal is at phase 3 so browser should be supporting without a flag soon. For folks that use bundlers that bundler should also be able to lower this away.

It seems like we should want a new setting for enable this, which should allow us to elide a lot of the wasm file loading code.

Chromium tracking issue: https://issues.chromium.org/issues/42204365

sbc100 commented 1 day ago

CC @guybedford