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).