rust-lang / rustc-demangle

Rust symbol demangling
Apache License 2.0
231 stars 50 forks source link

Expose a richer description of demangled symbol. #28

Open jrmuizel opened 5 years ago

jrmuizel commented 5 years ago

This would help those who would otherwise try to parse the demangled name like cargo bloat

https://docs.rs/msvc-demangler/0.7.0/msvc_demangler/struct.ParseResult.html is an example of this for msvc style demangling.

eddyb commented 5 years ago

See also @michaelwoerister's std-mangle-rs for the new mangling scheme (I'm not sure if it's updated to the final RFC version).

The difference between this crate and that is this crate only requires libcore and prints while demangling, whereas that one demangles to an Arc tree (i.e. it needs allocation).

EFanZh commented 3 years ago

I have tried std-mangle-rs, but it does not handle the current v0 mangling syntax very well. So I decided to write one myself: https://github.com/EFanZh/ast-demangle, which supports the current v0 mangling scheme. I hope it can be useful for anyone that’s interested.

michaelwoerister commented 3 years ago

That looks pretty good, @EFanZh. Keep up the good work! 😃