abnf-rust 2.5.0


pip install abnf-rust

  Latest version

Released: May 13, 2026

Project Links

Meta
Author: Charles Yeomans
Requires Python: >=3.10

Classifiers

Development Status
  • 4 - Beta

Intended Audience
  • Developers

License
  • OSI Approved :: MIT License

Programming Language
  • Python
  • Python :: 3
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14
  • Rust

Topic
  • Software Development :: Code Generators
  • Software Development :: Interpreters

abnf-rust

Rust-backed parser engine for the abnf package.

This is a companion distribution: install it via

pip install abnf[rust]

The package supplies the importable Python module abnf_rust, a compiled extension built with PyO3 that accelerates the combinator engine in abnf.parser. When abnf_rust is importable, abnf.parser automatically routes its combinator primitives through this module; the pure-Python implementation in abnf._parser_python remains available as a fallback and as the reference for behavior parity.

To force the pure-Python backend even when abnf-rust is installed, set the environment variable ABNF_NO_RUST=1.

Layout

  • rust/core/ โ€” pure-Rust parser engine (no Python dependency).
  • rust/pyo3/ โ€” PyO3 bindings, compiled to abnf_rust._ext.
  • src/abnf_rust/ โ€” Python wrapper package that re-exports the compiled symbols.

Building

maturin develop --manifest-path packages/abnf-rust/Cargo.toml

License

MIT.

No dependencies