rustwasm / twiggy

Twiggy🌱 is a code size profiler
https://rustwasm.github.io/twiggy
Apache License 2.0
1.26k stars 68 forks source link

Documentation for how to use Twiggy with wasm-pack #742

Open faassen opened 10 months ago

faassen commented 10 months ago

💡 Feature Description

I don't know how to use Twiggy with wasm-pack.

I would like to see documentation that explained what to do. Specifically, the instructions in #490 should go in the documentation. Note that these instructions are still not working for me due to a "WASM error: Unknown opcode"; I'm going to try to build from main to see whether that fixes it (that appears to have fixed it). See also #576

In addition I'd like to understand how to use Twiggy with a release mode binary; the instructions above I think require --dev. If that's possible, there should be something in the documentation about that so people don't go look for how to do it. See also #588

Or should I use something else than wasm-pack to get a wasm file? If so the documentation could mention what to do instead.

faassen commented 10 months ago

It appears that with Twiggy from git you can use --release with wasm-pack and it still appears to be able to generate useful information.