10 releases

0.1.9 Jul 18, 2018
0.1.7 Feb 26, 2018
0.1.5 Aug 12, 2017
0.1.4 Feb 25, 2017
0.1.1 Jul 10, 2016

#6 in Debugging

Download history 29794/week @ 2018-06-13 34358/week @ 2018-06-20 37558/week @ 2018-06-27 36041/week @ 2018-07-04 39029/week @ 2018-07-11 40110/week @ 2018-07-18 48497/week @ 2018-07-25 42846/week @ 2018-08-01 44298/week @ 2018-08-08 41173/week @ 2018-08-15 38104/week @ 2018-08-22 40589/week @ 2018-08-29 33728/week @ 2018-09-05

164,895 downloads per month
Used in 1,270 crates (21 directly)

MIT/Apache

19KB
340 lines

rustc-demangle

Symbol demangling for Rust

Build Status

Documentation

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in rustc-demangle you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

Demangle Rust compiler symbol names.

This crate provides a demangle function which will return a Demangle sentinel value that can be used to learn about the demangled version of a symbol name. The demangled representation will be the same as the original if it doesn't look like a mangled symbol name.

Demangle can be formatted with the Display trait. The alternate modifier (#) can be used to format the symbol name without the trailing hash value.

Examples

use rustc_demangle::demangle;

assert_eq!(demangle("_ZN4testE").to_string(), "test");
assert_eq!(demangle("_ZN3foo3barE").to_string(), "foo::bar");
assert_eq!(demangle("foo").to_string(), "foo");
// With hash
assert_eq!(format!("{}", demangle("_ZN3foo17h05af221e174051e9E")), "foo::h05af221e174051e9");
// Without hash
assert_eq!(format!("{:#}", demangle("_ZN3foo17h05af221e174051e9E")), "foo");

No runtime deps