Emscripten settings in configure.ac are not embedding friendly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
I would like to be able to opt out of certain Emscripten options since I am embedded CPython in a larger application. For example, the forced inclusion of the JS file system is breaking my builds since I use WASMFS in my system which isn't compatible with -lidbfs.js, -lnodefs.js, -lproxyfs.js, -lworkerfs.js. Moreover, I would like to customise the TOTAL_MEMORY option.
Perhaps these options can be on by default but placed behind a flag that can turn them off? For example, --enable-wasm-emscripten-jsfs? Alternatively, perhaps all these settings can be disabled unless one of node, browser, node-debug, browser-debug is set via --with_emscripten_target?
Right now, it seems my only option is to apply a patch to turn these settings off which should be unnecessary in my opinion. @hoodmane @vstinner what do you think?
CPython versions tested on:
CPython main branch
Operating systems tested on:
Other
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading configure.ac around lines 2340-2351 and the existing --with_emscripten_target handling. Determine how the Emscripten JavaScript filesystem options and TOTAL_MEMORY are currently set, then define how embedded builds can opt out or customize them. Done means the requested settings can be controlled without maintaining a patch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, wasm
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100