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
86
87
88
89
90
91
92
93
[]
= ["crates/*"]
# ocpp-client itself (this manifest) is the workspace root and an implicit member - no need to
# list it. crates/* holds satellite crates that build on ocpp-client's public traits, starting
# with ocpp-transport-embassy-net and ocpp-board-stm32h723-nucleo (see
# PRODUCTION_READINESS.md item 6). Kept as workspace members rather than folded into this
# crate's own Cargo.toml because they pull in embedded-only dependencies (embassy-*) that most
# consumers of ocpp-client itself don't want.
#
# default-members is just this root package: neither satellite crate belongs in a plain
# `cargo build`/`test` run here. ocpp-board-stm32h723-nucleo depends on `cortex-m`'s inline
# `asm!`, which only compiles for a real ARM target, so it would fail outright targeting the
# host. ocpp-transport-embassy-net *does* build for the host, but including it as a default
# member made any `cargo <cmd> --features <name>` at the root ambiguous whenever <name> wasn't a
# feature on every default member (e.g. `--features test`, `--features ocpp_1_6` - both
# ocpp-client-only features) - Cargo can't tell which package you meant. Build/check/clippy the
# satellite crates explicitly with `-p <crate>` (see .github/workflows/ci.yaml's `embedded` job
# and each crate's README).
= ["."]
[]
= '2024'
= "ocpp-client"
= "0.2.2"
= "OCPP Client Implementation. Use this library to implement an OCPP charge point"
= "https://github.com/flowionab/ocpp-client"
= "MIT OR Apache-2.0"
= ["Joatin Granlund <joatin@granlund.io>"]
= ["OCPP", "ChargePoint", "Client", "ocpp16", "ocpp201"]
[]
= ["std", "tokio-runtime", "websocket", "ocpp_1_6", "ocpp_2_0_1", "ocpp_2_1"]
# Pulls in std/alloc-only support. Forwards to critical-section's `std` backend (gates the
# mutex implementation src/sync.rs's `CriticalSectionRawMutex` uses under the hood) and
# tracing's `std` feature (thread-local span/event dispatch instead of tracing's no_std
# global-only dispatch). `ocpp-types` needs no forwarding here - its own `alloc` feature is
# unconditionally enabled below regardless of this crate's `std` status, since even the
# no_std+alloc build wants plain `alloc::String`/`Vec` for spec-unbounded fields rather than
# const-generic-sized `heapless` collections (see MIGRATION_OCPP_TYPES.md). Disable `std` for
# no_std + alloc targets (embedded); the engine itself (src/client.rs) has no unconditional
# std/tokio dependency left - see the `Executor`/`Timer` traits in src/runtime.rs. Embedded
# users must supply their own `Executor`/`Timer` impls plus a `critical-section` backend for
# their target (via `critical_section::set_impl!`), and their own `tracing::Subscriber` (e.g. a
# `defmt`/RTT-backed one) if they want the log output.
= ["critical-section/std", "tracing/std"]
# tokio-backed `Executor`/`Timer` impls (`TokioExecutor`/`TokioTimer`). Implies `std`.
= ["std", "dep:tokio"]
# WebSocket transport. tokio-tungstenite inherently needs a tokio runtime, so this implies
# `tokio-runtime`.
= ["tokio-runtime", "dep:tokio-tungstenite", "dep:futures", "dep:url", "dep:rustls", "dep:base64"]
# `ocpp-types` has no per-version cargo features (v16/v201/v21 always compile in), so these
# just gate this crate's own src/ocpp_{1_6,2_0_1,2_1}/ modules.
= []
= []
= []
= []
[]
# Strongly typed, no_std+no_alloc-by-default OCPP message types generated from the official
# JSON schemas - see MIGRATION_OCPP_TYPES.md for why this replaced the rust-ocpp fork.
= { = "0.1.3", = false, = ["serde", "alloc"] }
= { = "1", = false, = ["derive", "alloc"] }
= { = "1", = false, = ["alloc"] }
= { = "1", = false, = ["v4"] }
# no_std+alloc-friendly Mutex/Signal primitives backing src/sync.rs - used unconditionally by
# the engine regardless of the `std`/`tokio-runtime` features.
= { = "0.8", = false }
= { = "1" }
# Only needed for the tokio-backed `Executor`/`Timer` impls (`tokio-runtime` feature) and the
# WebSocket transport, which needs a tokio runtime regardless.
= { = "1", = ["sync", "rt", "time"], = true }
= { = "0.28", = ["rustls-tls-webpki-roots"], = true }
= { = "0.3", = true }
= { = "2.5", = true }
= { = "0.23", = true }
= { = "0.22", = true }
= { = "0.1.44", = false }
[]
= { = "1", = ["full"] }
= { = "^0.4", = false, = ["now"] }
= { = "0.14.8", = false, = ["aws_lc_rs", "pem"] }
= "0.26"
= { = "0.2.6", = ["no-env-filter"] }
= { = "0.5", = ["async_tokio"] }
[[]]
= "call_roundtrip"
= false