WebAssembly template size bold and export un wanted symbol!

learnfirst1 learnfirst1 at gmail.com
Fri Aug 10 06:41:51 UTC 2018


I try to build WebAssembly project, the wasm size is grow into 
300kb even with "-Os -inline -release -noboundscheck".


there is a lot symbol like:

_foreachbody2MFPSQDfQDd10GameAssertZQBnMFPSQEfQEd10GameMethodZQCnMFPSQFfQFd12S2OptionZi


To build a c base game engine the size only like 90kb,  to build 
with D there is not so much login the size already be huge.


And the LLD is not inline  function for WASM like linux static 
binary format.

How can we cut down the size so we can make the LDC  generate 
WASM more deploy friendly.


Hidden un want symbol can cut down the size huge,  since WASM 
really don't want to expose internal symbol.   I think some 
option like https://github.com/ldc-developers/ldc/issues/2431  
will be great.

Please share your opinion.






More information about the digitalmars-d-ldc mailing list