You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using trunk to create wasm builds. I care a lot about the size of my emitted binary, so I am using the tool Twiggy to determine what functions/crates are contributing most to my binary size. A problem with Twiggy is it really needs symbol names to be useful. Without symbol names it can tell you that, say, a particular function is 16% of your binary size, but the function name is just a long hex number so this isn't actionable.
Trunk has previously added support for symbols in debug mode. However when testing for size debug mode becomes problematic. Debug/Release mode has an order-of-magnitude difference on file size (like, a 300k binary becomes a 2.6MB binary) and I worry that that size profiling on debug might be systematically misleading (for example what if a function is 16% of the binary in debug mode but only 2% with inlining from release mode or whatever).
Some buildsystems have an option where they build in release mode but with symbols included. Could Trunk add a version of this? (Building in release mode with symbols emitted as a separate file might also be as useful or more useful, but I don't know if this is possible in wasm or if twiggy would need changes to support it.)
The text was updated successfully, but these errors were encountered:
Wait, I'm sorry, trunk already has this capability and decides whether or not to include symbols based on the presence or absence of "strip=" in the Cargo.toml (the correct approach imo).
I am using trunk to create wasm builds. I care a lot about the size of my emitted binary, so I am using the tool Twiggy to determine what functions/crates are contributing most to my binary size. A problem with Twiggy is it really needs symbol names to be useful. Without symbol names it can tell you that, say, a particular function is 16% of your binary size, but the function name is just a long hex number so this isn't actionable.
Trunk has previously added support for symbols in debug mode. However when testing for size debug mode becomes problematic. Debug/Release mode has an order-of-magnitude difference on file size (like, a 300k binary becomes a 2.6MB binary) and I worry that that size profiling on debug might be systematically misleading (for example what if a function is 16% of the binary in debug mode but only 2% with inlining from release mode or whatever).
Some buildsystems have an option where they build in release mode but with symbols included. Could Trunk add a version of this? (Building in release mode with symbols emitted as a separate file might also be as useful or more useful, but I don't know if this is possible in wasm or if twiggy would need changes to support it.)
The text was updated successfully, but these errors were encountered: