{"id":8613,"library":"rust-demangler","title":"Rust Demangler","description":"A package for demangling Rust symbols, written in Python. It provides a simple interface to convert Rust's compiler-generated symbol names into human-readable forms. The current version is 1.0, last updated in April 2021, suggesting a low release cadence.","status":"active","version":"1.0","language":"en","source_language":"en","source_url":"https://github.com/teambi0s/rust_demangler","tags":["Rust","demangling","symbols","reverse engineering","binary analysis"],"install":[{"cmd":"pip install rust-demangler","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"note":"The 'demangle' function is directly exposed at the top-level package namespace, not within a sub-module named 'demangle'.","wrong":"import rust_demangler.demangle","symbol":"demangle","correct":"from rust_demangler import demangle"}],"quickstart":{"code":"from rust_demangler import demangle\n\nmangled_name_v0 = '_ZN3foo3barE'\nmangled_name_legacy = '_ZN4core3fmt9Arguments9new_const17hf7eafdf6c5e03508E'\n\ndemangled_v0 = demangle(mangled_name_v0)\ndemangled_legacy = demangle(mangled_name_legacy)\n\nprint(f\"Original mangled (v0): {mangled_name_v0} -> Demangled: {demangled_v0}\")\nprint(f\"Original mangled (legacy): {mangled_name_legacy} -> Demangled: {demangled_legacy}\")\n\n# Example of expected output for '_ZN3foo3barE' is 'foo::bar'","lang":"python","description":"This quickstart demonstrates how to import the `demangle` function and use it to demangle common Rust symbol names. It includes examples for both older and newer mangling styles for illustrative purposes."},"warnings":[{"fix":"Manually verify demangled output for critical paths. If issues persist, consider using a more actively maintained demangling tool or the native `rustc-demangle` Rust crate directly.","message":"Rust's symbol mangling scheme has evolved (e.g., from legacy to v0). This Python wrapper was last updated in April 2021, and might not fully support all newer mangling formats or edge cases introduced or stabilized in Rust since then, potentially leading to incorrect or incomplete demangling for recent binaries.","severity":"gotcha","affected_versions":"All versions (1.0) against newer Rust compilers"},{"fix":"Test demangling against known symbols from the specific target architecture. If problems arise, investigate platform-specific demangling behavior or alternative tools like `rustfilt`.","message":"Users might encounter incomplete demangling for symbols specifically from certain target architectures (e.g., i686-pc-windows-msvc) on stable Rust versions. This can be due to platform-specific symbol prefixes or conventions that the demangler might not fully handle.","severity":"gotcha","affected_versions":"All versions (1.0)"},{"fix":"Be aware of potential mismatches with very recent Rust compiler outputs. If the demangling functionality is critical and needs to be perfectly aligned with the absolute latest Rust compiler changes, consider direct integration with the `rustc-demangle` Rust crate if your project allows for it.","message":"The Python `rust-demangler` library has not been updated since April 2021. While the underlying Rust `rustc-demangle` crate is actively maintained by the Rust project, this Python binding may lag behind, potentially missing updates for new Rust symbol mangling formats, performance improvements, or bug fixes from the Rust side.","severity":"gotcha","affected_versions":"All versions (1.0)"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Run `pip install rust-demangler` to install the library.","cause":"The `rust-demangler` package is not installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'rust_demangler'"},{"fix":"Change your import statement to `from rust_demangler import demangle`.","cause":"The `demangle` function is imported incorrectly. It is available directly from the `rust_demangler` package, not as an attribute of a submodule or the package itself when imported as `import rust_demangler`.","error":"AttributeError: module 'rust_demangler' has no attribute 'demangle'"},{"fix":"Verify that the `rust-demangler` library is the most up-to-date available. If the issue persists with modern Rust binaries, consider that the library might not support the latest mangling standards due to its last update date. Alternative tools like `rustfilt` (a Rust CLI tool) may offer more up-to-date demangling capabilities.","cause":"The input symbol uses a Rust mangling scheme (e.g., a very new 'v0' variant) that the `rust-demangler` library's current version (1.0, last updated 2021) does not fully support.","error":"Mangled symbol not correctly demangled (output is still mangled or partially demangled)."}]}