Skip to main content

Python bindings for rustc-demangle crate

Project description

pyderust

Python bindings for the rustc-demangle crate.

Installation

pip install pyderust

Usage

from pyderust import demangle, DemangleError

# Demangle a Rust symbol (legacy mangling)
demangle("_ZN3foo3barE")  # => "foo::bar"

# Demangle a v0 symbol
demangle("_RNvC4test4main")  # => "test::main"

# Include the hash suffix
demangle("_ZN3foo17h05af221e174051e8E", include_hash=True)  # => "foo::h05af221e174051e8"

# Without hash (default)
demangle("_ZN3foo17h05af221e174051e8E")  # => "foo"

Error Handling

DemangleError is raised when a symbol cannot be demangled. It is a subclass of ValueError.

from pyderust import demangle, DemangleError

try:
    demangle("not_a_rust_symbol")
except DemangleError as e:
    print(e)  # => "not a valid Rust mangled symbol: not_a_rust_symbol"

Development

# Create a virtual environment and install dev dependencies
python -m venv .venv
source .venv/bin/activate
pip install maturin pytest

# Build and install in development mode
maturin develop

# Run tests
pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyderust-1.0.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyderust-1.0.0-cp39-abi3-win_amd64.whl (118.6 kB view details)

Uploaded CPython 3.9+Windows x86-64

pyderust-1.0.0-cp39-abi3-musllinux_1_2_x86_64.whl (418.0 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ x86-64

pyderust-1.0.0-cp39-abi3-musllinux_1_2_aarch64.whl (375.8 kB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

pyderust-1.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (205.9 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

pyderust-1.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (198.3 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

pyderust-1.0.0-cp39-abi3-macosx_11_0_arm64.whl (190.3 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

pyderust-1.0.0-cp39-abi3-macosx_10_12_x86_64.whl (198.1 kB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file pyderust-1.0.0.tar.gz.

File metadata

  • Download URL: pyderust-1.0.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyderust-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c2231c3ef2a0db1ffdd5a081929cd2587a1a5a992d526fee7133b6bd5526ad93
MD5 eb41009d01734a38c3a06e73753b8e69
BLAKE2b-256 f2275eaa50a22dfdf7184499e36424728290236cde3e17121a4f888ef2c468ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyderust-1.0.0.tar.gz:

Publisher: release.yml on tedanvosin/pyderust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyderust-1.0.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: pyderust-1.0.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 118.6 kB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyderust-1.0.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 795a32322d0d55efca66ddb3576610bf353a4038568bbe71f6d37b7512bea670
MD5 92fe1d1318d1940b3c33c3d0ab84f7dc
BLAKE2b-256 17f363f9e9c9646c99b6c1b81e4f8dd465284f8d44b8bcb56add2c6a8a6f5725

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyderust-1.0.0-cp39-abi3-win_amd64.whl:

Publisher: release.yml on tedanvosin/pyderust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyderust-1.0.0-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyderust-1.0.0-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b46dc94ef3011956c95781dff06d5d86a833ba8660363dd267da0aa3641ffadf
MD5 72a63abbb981cadd9d187ba55f410fcc
BLAKE2b-256 d1cc42310d6a4ee0b02f48ce193b1999a3e49e72aeebebe7df70b3176110b485

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyderust-1.0.0-cp39-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on tedanvosin/pyderust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyderust-1.0.0-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pyderust-1.0.0-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 62248dd75464f9f4a60000b850e92b7f5acdd58ad00dcbc253daecee71162d8b
MD5 a344f2f21c5e4689ca501c7334b7659d
BLAKE2b-256 cf0ec158e3aa8dde0187d077257536fd893d0c1c0a9ce31a06e744c4d7d16d4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyderust-1.0.0-cp39-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yml on tedanvosin/pyderust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyderust-1.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyderust-1.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1942e422eab18e6df72072171c49132459cae69c49153c23367c6b295ab88825
MD5 4f480c27358194a6afcc4d71624e6412
BLAKE2b-256 f37abb9b6916d72014723cf71785f221932b0c0fdd13bf19c85cc8f9ce69fdae

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyderust-1.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on tedanvosin/pyderust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyderust-1.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pyderust-1.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 43fc354b2eddbeed24adce268ab9fb3b91895db7036ed8b27fd4e02e3c6669f9
MD5 f44a14ab72eb5debeabfe37c4099e359
BLAKE2b-256 5f9f7486e2e7bb9274b3ebc932cadfd4fc4afef903b5848770537a6c6b6951a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyderust-1.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on tedanvosin/pyderust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyderust-1.0.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyderust-1.0.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ee8a8ae3ff9956582c2165698df873bd1bb865fc2ffa8d2552f303e1d914d959
MD5 9d3700974e4d9bfe1c6f786946ae2b21
BLAKE2b-256 96148bb8ba58f399ab937b8bef3733bed4e50dc0e7dc63404d2598285cf025a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyderust-1.0.0-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on tedanvosin/pyderust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyderust-1.0.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pyderust-1.0.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 961f5de9c44700bedf1c774f3176e2094a1660e44077e75827b51e3e0160a28d
MD5 495ba6f8738ae9d73b5b632744f63b81
BLAKE2b-256 bc7c26ae6f7769cd847ca47585ce0fc0f7c08f599b092a6ebedc2c49ac4c2e2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyderust-1.0.0-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on tedanvosin/pyderust

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page