-
Notifications
You must be signed in to change notification settings - Fork 70
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
How to use Twiggy with wasm-pack? #490
Comments
Apparently, I'm not the only one to run into this issue: #439 |
According to the manual if you pass |
Unfortunately, that doesn't actually work. The closest I could get it was specifying the wasm opt flags ['-g', '-O'] in the cargo.toml file.
|
I managed to get more info by using The analysis of using
And by the way, is there a way to reduce the size of the top two? Thanks. |
Having the same issue as @maple-leaf but using seed-rs framework
|
[package.metadata.wasm-pack.profile.release]
wasm-opt = ['-g', '-O'] worked for me. |
I'll close this as I think the answer above solves it. If there are still issues, please reopen it and I'll try to reproduce it. |
Hi, this was closed but I do not think the problem is resolved. The issue here (twiggy running in my default configuration with no symbols) was the first and largest problem I hit running Twiggy, but there was nothing I found in the documentation to guide me in building my app for Twiggy support and the answer turned out to be in a closed issue. Not easy to find. After finding this issue I was able to get twiggy to work by using both --dev and the wasm-opt cargo stanza above. My suggestion would be to add a section to the "Twiggy guide" explaining what kinds of things Twiggy needs to provide useful graphs with symbols. Mentioning the two wasm-pack specific issues as well as Thanks |
I am using
wasm-pack
to compile my project to a wasm file, and attempted to use Twiggy to profile the code size, following the online documentation. However, the output of Twiggy was completely useless.I'm guessing that Twiggy doesn't work on wasm files where the debug information was stripped, but I can't find any way to make wasm-pack output that information, and it seems counter productive to reducing binary size in any case. Is there any way to use Twiggy with wasm-pack? It seems like a strange oversight that the two tools recommended for working with wasm are completely incompatible.
The text was updated successfully, but these errors were encountered: