A Rust workspace containing the DBC (CAN Database) file parser library and command-line tools.
The core library for parsing, editing, and writing DBC files. Supports both std and no_std environments.
Features:
- ✅ Zero dependencies - Pure Rust implementation
- ✅ no_std + alloc support - Works on embedded targets without the standard library
- ✅ Full editing & writing - Modify and save DBC files with the same structs
- ✅ Feature flag control - Optional
stdfeature for desktop conveniences - ✅ Internationalized errors - Build-time language selection (English, French, Spanish, German, Japanese)
- ✅ Comprehensive validation - Signal overlap detection, boundary checking, and more
- ✅ Well tested - Tested with real-world DBC files
Command-line interface for working with DBC files.
Features:
- Version information
- DBC file manipulation (coming soon)
Add to your Cargo.toml:
[dependencies]
dbc-rs = { path = "./dbc" }cargo run --bin dbc-cli -- versionBuild all workspace members:
cargo buildBuild without default features (no_std):
cargo build --no-default-featuresRun all tests:
cargo testCode coverage is tracked automatically in CI. To check coverage locally:
# Install cargo-llvm-cov using prebuilt binary (recommended)
host=$(rustc -vV | grep '^host:' | cut -d' ' -f2)
curl --proto '=https' --tlsv1.2 -fsSL \
"https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-$host.tar.gz" \
| tar xzf - -C "$HOME/.cargo/bin"
# Generate coverage report
cargo llvm-cov --all-features --workspace
# Generate HTML report (opens in browser)
cargo llvm-cov --all-features --workspace --htmlNote: Prebuilt binaries are recommended because cargo install may fail with MSRV (1.85.0). CI uses latest stable Rust and works automatically.
The project aims for at least 80% code coverage. Coverage reports are automatically generated in CI and posted as PR comments.
For a comprehensive security audit, see SECURITY.md.
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
For commercial licensing, see LICENSING.md.