bgpkit-parser is a Rust library for parsing MRT/BGP/BMP data. It provides both a library API and a CLI (bgpkit-parser binary).
Key features defined in Cargo.toml:
default—parser+rustlsparser— core parsing (bytes, chrono, regex, zerocopy)cli— command-line interface (clap, env_logger, serde, serde_json)rislive— RIS Live WebSocket support (serde, serde_json, hex)serde— serialization supportnative-tls/rustls— TLS backend selectionxz/lz— optional compression algorithms
Always build with --all-features and include examples:
cargo build --all-features --examples
Always run tests with --all-features:
cargo test --all-features
Always run clippy with --all-features:
cargo clippy --all-features
cargo fmt does not accept --all-features (formatting is feature-independent):
cargo fmt
To check formatting without modifying files:
cargo fmt -- --check
- The
bgpkit-parserbinary requires theclifeature (required-features = ["cli"]). - Examples under
examples/may require specific features (see[[example]]entries inCargo.toml). - Benchmarks use Criterion (
[[bench]]entries).
When looking for incomplete or missing BGP attribute implementations, check src/parser/bgp/attributes/README.md. This file contains:
- Unit Test Coverage table — lists fully implemented attributes with RFC references
- Known Limitations table — lists attributes that are:
- Type defined in
AttrTypeenum but have no parser (e.g., PMSI_TUNNEL, BGPSEC_PATH) - Model structs exist but parser/encoder not yet implemented (e.g., AIGP, ATTR_SET)
- Type defined in
Use this file to identify which attributes need implementation work and their corresponding RFCs.