[package]
name = "dbc-rs"
version = "0.1.3"
edition = "2024"
license = "MIT OR Apache-2.0"
authors = ["dbc-rs contributors"]
repository = "https://github.com/reneherrero/dbc-rs"
homepage = "https://github.com/reneherrero/dbc-rs"
rust-version = "1.85.0"
readme = "README.md"
description = "Database CAN (DBC) parsing and editing library"
documentation = "https://docs.rs/dbc-rs"
keywords = ["can", "dbc", "automotive", "no_std"]
categories = ["parsing", "embedded"]
exclude = [".github/", "examples/", "tests/"]

[dependencies]

[dependencies.heapless]
version = "0.9.2"
optional = true

[dependencies.embedded-can]
version = "0.4.1"
optional = true

[package.metadata.docs.rs]
features = ["std"]

[features]
default = ["std"]
alloc = []
heapless = ["dep:heapless"]
std = ["alloc"]
embedded-can = ["dep:embedded-can"]

[[example]]
name = "create_dbc"
path = "examples/create_dbc.rs"
required-features = ["std"]

[[example]]
name = "parse_std"
path = "examples/parse_std.rs"
required-features = ["std"]

[[example]]
name = "parse_no_std"
path = "examples/parse_no_std.rs"
required-features = ["alloc"]

[[example]]
name = "decode"
path = "examples/decode.rs"
required-features = ["std"]

[[example]]
name = "encode"
path = "examples/encode.rs"
required-features = ["std"]

[[example]]
name = "decode_frame"
path = "examples/decode_frame.rs"
required-features = ["std", "embedded-can"]

[dev-dependencies]
proptest = { version = "1.9.0", default-features = false, features = ["std"] }
criterion = { version = "0.8.1", default-features = false }

[[bench]]
name = "parse_bench"
harness = false
required-features = ["std"]
