Skip to content
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

WASM: auto-export library functions, make elements support optional #249

Merged
merged 1 commit into from
Nov 25, 2020

Conversation

jgriffiths
Copy link
Contributor

No description provided.

@shesek
Copy link
Contributor

shesek commented Nov 27, 2020

It seems like the wasm bundle I'm building for esplora grew from 79kb to 133kb, could this be due --enable-export-all? Why was it added?

Edit: Nope, it is not that, I tried without --enable-export-all and got the same size. Maybe libwally just got bigger since lawrence's original webassembly branch?

@jgriffiths
Copy link
Contributor Author

jgriffiths commented Nov 27, 2020

Edit: Nope, it is not that, I tried without --enable-export-all and got the same size. Maybe libwally just got bigger since lawrence's original webassembly branch?

--enable-export-all just disables symbol visibility. I think the size is controlled by which functions you choose to export. If you pass your own list of just the functions you need, the optimiser will eliminate all the dead code leaving you with a minimal wasm file.

edit: I see you are passing your own list of functions, I can't explain this but its possible the code has grown since Lawrence did the first wasm port I think. You could try earlier wally versions if you want to find out when it grew...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants