Twiggy is a specialized code size profiler designed for analyzing WebAssembly (Wasm) binaries, helping developers understand why their compiled output is large and how different functions contribute to that size. It works by inspecting a binary’s call graph and providing detailed breakdowns of which functions are included and how they are interconnected, allowing developers to trace dependencies and identify unnecessary code paths. This makes Twiggy particularly useful in performance-sensitive environments such as web applications, embedded systems, and blockchain smart contracts, where minimizing binary size is critical. The tool offers multiple analysis modes that answer questions like why a function is present, how much space it consumes, and what dependencies pull it into the final binary. By surfacing insights about symbol sizes and call relationships, Twiggy enables developers to optimize builds, remove dead code, and improve load times.
Features
- Code size profiling for WebAssembly binaries
- Call graph analysis for dependency tracing
- Detailed function-level size breakdowns
- Identification of unused or bloated code paths
- Multiple analysis commands for different insights
- Integration with Rust and Wasm toolchains