#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

new 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

#90 in Development tools

Download history 15104/week @ 2024-01-20 13888/week @ 2024-01-27 17381/week @ 2024-02-03 17092/week @ 2024-02-10 15087/week @ 2024-02-17 15649/week @ 2024-02-24 14820/week @ 2024-03-02 15130/week @ 2024-03-09 14382/week @ 2024-03-16 11557/week @ 2024-03-23 12351/week @ 2024-03-30 13135/week @ 2024-04-06 12685/week @ 2024-04-13 13041/week @ 2024-04-20 14548/week @ 2024-04-27 13976/week @ 2024-05-04

56,652 downloads per month
Used in 17 crates (7 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