Guidance on producing smallest WASM binary #1436
Replies: 1 comment 1 reply
-
Yes, that has been removed. That simplified the library a lot, and we believe that setting small numbers for ecmult-window and ecmult-gen-precision should be good enough. (But I see that WASM is of course a bit special because binary size directly translates to network traffic...)
You could try this: (Maybe together with
This should drop all unused functions and data during linking. I've never tried this on WASM, and I don't know if it gives you that much. It's mostly useful if you don't need signing or verification (because then the respective table can be dropped).
Have you tried By the way, you should also try We test on many platforms in CI, but we don't test on WASM currently. Perhaps we should do this. |
Beta Was this translation helpful? Give feedback.
-
I'm currently experimenting with compiling a WASM binary that exports a selection of functions.
Going through issues, comments, and PRs, I've learned that there used to be an option to disable precomputing the tables - but that the current approach does not have an equivalent?
I'm currently using an ecmult-window size of 2 of ecmult-gen-precision of 2 in order to get the smallest binary, with moderate success (240 KB). Is there a configuration or linking setup I'm missing that would allow me to shrink this even further?
Any suggestions are greatly appreciated.
And the functions i'm currently exporting:
Beta Was this translation helpful? Give feedback.
All reactions