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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
[]
= "ocpp-types"
= true
= true
= true
= true
= true
= true
= "Strongly typed OCPP 1.6J, 2.0.1, and 2.1 message types for Rust. no_std, no alloc, embedded-friendly."
= "../../README.md"
= ["ocpp", "ev-charging", "charging-station", "embedded", "no-std"]
= ["embedded", "no-std", "encoding", "network-programming"]
# Without this, docs.rs builds default features only -- which would hide the
# `chrono` interop entirely, and document every type in its `alloc` shape with
# no sign that the allocation-free build exists.
[]
= true
= ["--cfg", "docsrs"]
[]
# Pinned to 0.8 on purpose: serde-json-core 0.6 (the latest) still depends on
# heapless 0.8, so moving to 0.9 would link *two* copies of heapless into any
# downstream binary using the `serde` feature -- a real size cost for a crate
# whose point is embedded/no-alloc. Bump this once serde-json-core follows;
# the wrapper types' `TryFrom` impls already handle 0.9's `CapacityError`, so
# it should be a one-line change.
= "0.8"
= { = "1", = false, = ["derive"], = true }
= { = "0.6", = true }
# Interop only, never the representation: `OcppTimestamp` stays the crate's
# own 16-byte type, and this adds conversions for callers already using
# chrono. `default-features = false` keeps it off the `std` path.
= { = "0.4", = false, = true }
[]
# `alloc` is on by default. Without it every field is stored inline at its
# declared capacity, which is the point of the crate on an MCU but is a poor
# default for the majority of users -- a CSMS, a simulator, a test harness --
# who have an allocator and would otherwise meet multi-kilobyte message types
# for no reason. Turn it off with `default-features = false` for the
# allocation-free build; see the crate docs for sizing guidance.
= ["alloc"]
= ["dep:serde", "dep:serde-json-core", "heapless/serde"]
# Fields with no spec-given bound (no `maxLength`/`maxItems`) use
# `alloc::string::String`/`alloc::vec::Vec<T>` when this is enabled, instead
# of a `heapless` collection sized by a caller-chosen const generic.
# `serde?/alloc` is a weak dependency feature: it only turns on serde's own
# `alloc` support (needed for `Serialize`/`Deserialize` on those types) when
# the `serde` feature is *also* enabled, without pulling serde in on its own.
= ["serde?/alloc"]
# Spec-conformance checks the type system cannot carry: the `maxLength` of a
# string too large to inline as a `heapless::String` (which is a plain
# `alloc::string::String` under `alloc`, and a caller-chosen capacity
# without it), plus every `minItems`/`minimum`/`maximum`/`multipleOf` in the
# schemas, none of which a collection type can express. Off by default: a
# station that only ever *builds* messages from bounded fields pays nothing,
# while a CSMS -- which is where over-long payloads actually originate --
# turns it on. See the `validate` module.
= []
# `From`/`Into` between `OcppTimestamp` and `chrono::DateTime`. Additive:
# no message type changes shape, and chrono's own (allocating) serde support
# is not pulled onto the wire path.
= ["dep:chrono"]
[[]]
= "basic_usage"
[[]]
= "serialization"
= ["serde"]
[[]]
= "rpc_error_codes"
[[]]
= "unbounded_fields"
[[]]
= "envelope"
= ["serde"]
[[]]
= "validate"
= ["validate", "alloc"]