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

bin+lib msvc-demangler

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

12 releases (breaking)

Uses old Rust 2015

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

#114 in Development tools

Download history 10565/week @ 2023-11-21 11335/week @ 2023-11-28 10478/week @ 2023-12-05 11532/week @ 2023-12-12 9642/week @ 2023-12-19 6370/week @ 2023-12-26 10199/week @ 2024-01-02 12802/week @ 2024-01-09 14790/week @ 2024-01-16 14268/week @ 2024-01-23 14999/week @ 2024-01-30 18205/week @ 2024-02-06 14829/week @ 2024-02-13 15497/week @ 2024-02-20 16352/week @ 2024-02-27 11848/week @ 2024-03-05

61,696 downloads per month
Used in 16 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

~110KB