Demangling C++ Symbols in Rust
> These days, almost every C++ compiler uses the Itanium C++ ABI’s name mangling rules. The notable exception is MSVC, which uses a completely different format.You stay classy, Microsoft.>  Its not just the grammar that’s huge, the symbols themselves are too. Here is a pretty big mangled C++ symbol from SpiderMonkey [...] That’s 355 bytes!Here's a >4kB symbol I encountered while liberating some ebooks from an abandoned DRM app:    tetraphilia::transient_ptrs >::ptr_type tetraphilia::imaging_model::MakeIdealPixelProducer >, tetraphilia::imaging_model::SpecializedRasterXWalker, tetraphilia::imaging_model::SpecializedRasterXWalker >, tetraphilia::imaging_model::GraphicXWalkerList3, 0ul, 0, 1ul, 0ul, 0, 0ul, 0ul, 0, 0ul, 1ul>, tetraphilia::imaging_model::GraphicXWalker >, tetraphilia::imaging_model::const_SpecializedRasterXWalker, tetraphilia::imaging_model::const_SpecializedRasterXWalker >, tetraphilia::imaging_model::GraphicXWalker >, tetraphilia::imaging_model::OneXWalker >, tetraphilia::imaging_model::const_SpecializedRasterXWalker > > >, tetraphilia::TypeList >, tetraphilia::imaging_model::SpecializedRasterXWalker, tetraphilia::imaging_model::SpecializedRasterXWalker >, tetraphilia::imaging_model::GraphicXWalkerList3, 0ul, 0, 1ul, 0ul, 0, 0ul, 0ul, 0, 0ul, 0ul>, tetraphilia::imaging_model::GraphicXWalker >, tetraphilia::imaging_model::const_SpecializedRasterXWalker, tetraphilia::imaging_model::const_SpecializedRasterXWalker >, tetraphilia::imaging_model::GraphicXWalker >, tetraphilia::imaging_model::OneXWalker >, tetraphilia::imaging_model::const_SpecializedRasterXWalker > > >, tetraphilia::TypeList >, tetraphilia::imaging_model::SpecializedRasterXWalker, tetraphilia::imaging_model::SpecializedRasterXWalker >, tetraphilia::imaging_model::GraphicXWalkerList3, 0ul, 0, 1ul, 0ul, 0, 0ul, 0ul, 0, 0ul, 1ul>, tetraphilia::imaging_model::GraphicXWalker >, tetraphilia::imaging_model::const_SpecializedRasterXWalker, tetraphilia::imaging_model::const_SpecializedRasterXWalker >, tetraphilia::imaging_model::GraphicXWalker >, tetraphilia::imaging_model::const_SpecializedRasterXWalker, tetraphilia::imaging_model::const_SpecializedRasterXWalker > > >, tetraphilia::Terminal> >, T3AppTraits, tetraphilia::imaging_model::ByteSignalTraits, tetraphilia::imaging_model::SeparableOperation > > >(tetraphilia::ArgType >, tetraphilia::imaging_model::SpecializedRasterXWalker, tetraphilia::imaging_model::SpecializedRasterXWalker >, tetraphilia::imaging_model::GraphicXWalkerList3, 0ul, 0, 1ul, 0ul, 0, 0ul, 0ul, 0, 0ul, 1ul>, tetraphilia::imaging_model::GraphicXWalker >, tetraphilia::imaging_model::const_SpecializedRasterXWalker, tetraphilia::imaging_model::const_SpecializedRasterXWalker >, tetraphilia::imaging_model::GraphicXWalker >, tetraphilia::imaging_model::OneXWalker >, tetraphilia::imaging_model::const_SpecializedRasterXWalker > > >, tetraphilia::TypeList >, tetraphilia::imaging_model::SpecializedRasterXWalker, tetraphilia::imaging_model::SpecializedRasterXWalker >, tetraphilia::imaging_model::GraphicXWalkerList3, 0ul, 0, 1ul, 0ul, 0, 0ul, 0ul, 0, 0ul, 0ul>, tetraphilia::imaging_model::GraphicXWalker >, tetraphilia::imaging_model::const_SpecializedRasterXWalker, tetraphilia::imaging_model::const_SpecializedRasterXWalker >, tetraphilia::imaging_model::GraphicXWalker >, tetraphilia::imaging_model::OneXWalker >, tetraphilia::imaging_model::const_SpecializedRasterXWalker > > >, tetraphilia::TypeList >, tetraphilia::imaging_model::SpecializedRasterXWalker, tetraphilia::imaging_model::SpecializedRasterXWalker >, tetraphilia::imaging_model::GraphicXWalkerList3, 0ul, 0, 1ul, 0ul, 0, 0ul, 0ul, 0, 0ul, 1ul>, tetraphilia::imaging_model::GraphicXWalker >, tetraphilia::imaging_model::const_SpecializedRasterXWalker, tetraphilia::imaging_model::const_SpecializedRasterXWalker >, tetraphilia::imaging_model::GraphicXWalker >, tetraphilia::imaging_model::const_SpecializedRasterXWalker, tetraphilia::imaging_model::const_SpecializedRasterXWalker > > >, tetraphilia::Terminal> > > >, T3AppTraits::context_type&, tetraphilia::imaging_model::Constraints const&, tetraphilia::imaging_model::SeparableOperation > >, tetraphilia::imaging_model::const_GraphicYWalker > const*, tetraphilia::imaging_model::const_GraphicYWalker > const*, tetraphilia::imaging_model::const_GraphicYWalker > const*, tetraphilia::imaging_model::SegmentFactory >*)