-
Notifications
You must be signed in to change notification settings - Fork 3.5k
file_packager.py: Add option to embed file data in wasm binary #16050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
92608cb to
fc89621
Compare
c4718b7 to
eadafba
Compare
|
This change depends of a chain of cleanup/refactoring PRs than need to land first: |
fc89621 to
decb32d
Compare
002aa28 to
9258fe2
Compare
9258fe2 to
da737b9
Compare
|
Also depends on this llvm change: https://reviews.llvm.org/D117412 |
52ff804 to
3dbf141
Compare
da737b9 to
d33e5dd
Compare
d33e5dd to
2bc217b
Compare
kripken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
How much more do we need for this to work with WasmFS?
|
Perhaps mention the changelog? |
c3da14e to
2ecbd15
Compare
I think it should "just work" .. all it depends on is the |
2ecbd15 to
93a23d6
Compare
This change not only adds the new option but uses this option whenever file_packager is used from within emcc. Hopefully we can find a way deprecate and remove the old JS embedded since that seems strictly worse in almost ever way. - Larger code size (JS base64 encoding is larger than binary) - No possiblity of zero copy, memory-backed files - Less compatible with standalone wasm / WASI
93a23d6 to
adbf8dd
Compare
|
This seems to have broken the roller on windows: |
The object file output is more efficient way of embedding and has been recommended via a warning since emscripten-core#16050 (early 2022). With this simplification the file packager now has essentially two output modes: 1. Preloading via JS 2. Embedding via and object file
This change not only adds the new option but uses this option
whenever
file_packageris called from within emcc.Very heavily inspired by the larger change in #16028.
Hopefully we can find a way deprecate and remove the old JS
embedding code since that seems strictly worse in every(?) way: