Hi guys. I have very special use case to implement. My application have very big wasm: 19Mb, but I know that really used part (core) is 7Mb. I have names of all functions that are used in core part. Now I trying to minimize wasm file to 7Mb.
Currently I just drop all functions that not in this list, and my wasm is 7mb. But, of course rarely application crashed when tries to execute dropped function. I want to create solution that works in 100% cases. Again, my target is to have minimal possible wasm file with core functions. My idea is to use wasm2js or wasm2asm to generate js function in addtion to wasm binary. Generation flow: 1. For wasm function that not in list 2. genearte js code from wasm body (wasm2js/wsam2asm?) 3. replace body with call to js compliant function Loading: 1. Load wasm 2. Load sources of js compliant functions 3. Run wasm, when code ask to eval compliant function - create this function (from source) and run So my questions: 1. Is this flow will work, how do you think? 2. Can I use wasm2js/wasm2asm to generate js functions? 3. Can I use asyncify to load this functions by xhr at eval time? -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAKOm%3DVHNBYbK9mq%3DuErM_Oea5vNzVAeHbqypztp-0DxR0VZzfg%40mail.gmail.com.
