-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
54 lines (51 loc) · 2.52 KB
/
Copy pathCargo.toml
File metadata and controls
54 lines (51 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
[package]
name = "uds_protocol"
description = "A library for encoding and decoding UDS (ISO 14229) messages"
version = "0.1.0"
edition = "2024"
rust-version = "1.85.0"
license = "MIT OR Apache-2.0"
repository = "https://github.com/luminartech/uds_protocol"
homepage = "https://github.com/luminartech/uds_protocol"
documentation = "https://docs.rs/uds_protocol"
keywords = ["uds", "iso-14229", "automotive", "diagnostics", "obd"]
categories = ["encoding", "embedded", "hardware-support"]
authors = [
"Justin Kovacich <justin_kovacich@microvision.com>",
"Kimberly Kryger <kim_kryger@microvision.com>",
"Matthew Beisser <matthew_beisser@microvision.com>",
"Parth Patel <parth_patel@microvision.com>",
"Zachary Heylmun <zachary_heylmun@microvision.com>",
]
[features]
default = ["std"]
std = ["alloc", "embedded-io/std", "thiserror/std", "serde?/std"]
alloc = ["embedded-io/alloc", "serde?/alloc"]
# `serde` is the only optional integration usable on a bare-metal target. It is wired as a
# core-only dependency (`default-features = false`) and picks up serde's `alloc`/`std` layers
# only when this crate's own `alloc`/`std` features are on, via weak `serde?/..` features.
serde = ["dep:serde"]
# `utoipa` and `clap` both imply `std`. Their derive macros expand to `std::`, `String` and
# `Vec` paths inside this crate, which cannot compile under `#![no_std]`.
#
# `utoipa` additionally implies `serde`, because a `ToSchema` describes this crate's *serde*
# representation: several types serialize as a single protocol byte rather than as their Rust
# shape, and their schemas are written to match. A `utoipa`-without-`serde` build would therefore
# publish a schema for a wire format that build cannot produce. It also cost real complexity —
# every type reachable only through a serde repr needed a second cfg predicate and a
# `allow(dead_code)` to stay compilable in a configuration nobody wants.
utoipa = ["std", "serde", "dep:utoipa"]
clap = ["std", "dep:clap"]
[dependencies]
automotive-wire-codec = { version = "0.3", default-features = false }
bitmask-enum = "2"
embedded-io = { version = "0.7", default-features = false }
thiserror = { version = "2", default-features = false }
# Optional dependencies
serde = { version = "1", optional = true, default-features = false, features = ["derive"] }
utoipa = { version = "5", optional = true }
clap = { version = "4", optional = true, features = ["derive"] }
[dev-dependencies]
proptest = "1"
# Only used by the integration tests that check `serde` cannot bypass a type's validation.
serde_json = "1"