Lind-Project / lind-wasm

https://lind-project.github.io/lind-wasm-docs/
Apache License 2.0
1 stars 1 forks source link

A Potential Solution to Reduce the WASM Binary Size #25

Open yzhang71 opened 1 month ago

yzhang71 commented 1 month ago

Quoted from Qianxi Chen: "While I was researching this earlier, I coincidentally realized something: we previously had a WASM binary size issue because Asyncify would inflate the entire WASM size by three to four times. Then I realized that it's not necessary to apply Asyncify to every function in the entire WASM module. We only need to ensure that all functions on the call stack when invoking the clone syscall support Asyncify. This way, the functions that truly need Asyncify are actually only the user functions (and if we can perform static analysis on the user program, we could theoretically further narrow down the range of functions that require Asyncify), as well as a very few functions in glibc on the clone call stack. Therefore, in theory, the size inflation caused by Asyncify could be so minimal that it becomes negligible."