#demangle #c-plus-plus #msvc #undecorate

bin+lib msvc-demangler

A rust library that demangles / undecorates C++ symbols mangled by MSVC

11 releases (breaking)

Uses old Rust 2015

0.9.0 Jun 3, 2021
0.8.0 Aug 12, 2019
0.7.0 Nov 29, 2018
0.6.0 May 22, 2018

#284 in Debugging

Download history 6286/week @ 2022-06-04 6845/week @ 2022-06-11 6870/week @ 2022-06-18 7422/week @ 2022-06-25 8266/week @ 2022-07-02 6864/week @ 2022-07-09 6718/week @ 2022-07-16 8291/week @ 2022-07-23 8059/week @ 2022-07-30 8097/week @ 2022-08-06 9549/week @ 2022-08-13 12246/week @ 2022-08-20 8769/week @ 2022-08-27 9003/week @ 2022-09-03 10291/week @ 2022-09-10 8021/week @ 2022-09-17

37,095 downloads per month
Used in 14 crates (6 directly)

MIT/NCSA

92KB
2K SLoC

msvc-demangler

msvc-demangler is a crate for Rust that can demangle C++ symbols which use the MSVC mangling scheme. These are emitted by the Microsoft C++ compiler for Windows as well as some others.

Example

use msvc_demangler;
let flags = msvc_demangler::DemangleFlags::llvm();
let result = msvc_demangler::demangle("??_0klass@@QEAAHH@Z", flags).unwrap();
println!("{}", result);

Behavior

It's functionality is similar to undname on Windows and the underlying UnDecorateSymbolName function. Since Microsoft does not document the mangling scheme this is likely not to be entirely accurate. When unclear the implementation tries to follow what LLVM does.

License

This msvc-demangler is dual licensed under the MIT and the University of Illinois Open Source Licenses.

License: MIT/NCSA


lib.rs:

msvc-demangler is a crate for Rust that can demangle C++ symbols which use the MSVC mangling scheme. These are emitted by the Microsoft C++ compiler for Windows as well as some others.

Example

use msvc_demangler;
let flags = msvc_demangler::DemangleFlags::llvm();
let result = msvc_demangler::demangle("??_0klass@@QEAAHH@Z", flags).unwrap();
println!("{}", result);

Behavior

It's functionality is similar to undname on Windows and the underlying UnDecorateSymbolName function. Since Microsoft does not document the mangling scheme this is likely not to be entirely accurate. When unclear the implementation tries to follow what LLVM does.

License

This msvc-demangler is dual licensed under the MIT and the University of Illinois Open Source Licenses.

Dependencies