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

bin+lib msvc-demangler

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

13 releases (breaking)

Uses old Rust 2015

0.10.1 May 10, 2024
0.10.0 Feb 7, 2024
0.9.0 Jun 3, 2021
0.8.0 Aug 12, 2019
0.6.0 May 22, 2018

#2 in #msvc

Download history 13808/week @ 2024-06-16 14281/week @ 2024-06-23 14902/week @ 2024-06-30 18391/week @ 2024-07-07 18895/week @ 2024-07-14 19718/week @ 2024-07-21 14798/week @ 2024-07-28 13328/week @ 2024-08-04 13867/week @ 2024-08-11 15377/week @ 2024-08-18 14238/week @ 2024-08-25 15125/week @ 2024-09-01 14067/week @ 2024-09-08 13368/week @ 2024-09-15 14420/week @ 2024-09-22 13693/week @ 2024-09-29

56,202 downloads per month
Used in 19 crates (9 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

~105KB