Building block view¶
arc42 §5 — the building blocks that realise the toolchain, one crate per block. The dependency graph is Toolchain layering (crate d... (ARCH_0050); this page records each crate’s job, public surface, and the dependencies it is and is not allowed to carry.
The diagram below reads the same crates as a public-API pipeline: each layer’s output type is the next layer’s input, from ESI bytes through to the runtime trait surface the generated drivers implement.
graph LR
xml["ESI XML<br/>&str"]
p["BB_0060 ethercat-esi<br/>parse() → EsiFile IR"]
g["BB_0061 ethercat-esi-codegen<br/>generate<B>(IR, &B) → TokenStream<br/>naming + dedup + collision policy"]
b["BB_0062 -codegen-ethercrab<br/>CodegenBackend impl<br/>(sole ethercrab dep)"]
rt["BB_0063 ethercat-esi-rt<br/>EsiDevice / EsiConfigurable<br/>+ SdoWrite (no ethercrab)"]
build["BB_0064 ethercat-esi-build<br/>build.rs → prettyplease → $OUT_DIR"]
cli["BB_0065 ethercat-esi-cli<br/>cargo esi expand / list"]
ver["BB_0066 ethercat-esi-verify<br/>verify(xml, sii) → VerifyReport"]
adapter["BB_0067 connector EsiDevice adapter"]
xml --> p
p -->|EsiFile| g
g -->|CodegenBackend| b
b -->|implements| rt
g -->|TokenStream| build
g -->|TokenStream| cli
p -->|EsiFile| ver
rt --> adapter
The parse crate. Reads ESI XML via |
Codegen layer. Owns the |
The one concrete backend shipped in this round. Emits per-device
structs implementing |
The minimal trait crate consumed by generated devices and
adapters. Owns the object-safe |
Build-script helper consumed by downstream crates from their
|
Cargo subcommand binary providing |
Cross-validates ESI XML against captured SII EEPROM |
The thin glue inside |