Message-plane interface-description codegen

This chapter captures the requirements for the message-plane interface-description codegen toolchain: a layered set of crates that translates interface descriptions (today, CAN .dbc databases) into strongly-typed Rust message (de)serializers at build time, with a no_std, allocation-free, serde-free runtime (de)serialization path.

The decomposition is the message-plane twin of Device-driver codegen (the device-plane ESI toolchain) and CANopen device-driver codegen. Where the device-plane toolchains describe a device (identity + object dictionary + cyclic process image), this toolchain describes a message (the structs, enums, and request/reply services that cross a channel). The bounded message-type IR (taktora-idl-core (BB_0117)) is the peer of fieldbus-od-core:

This round delivers the DBC frontend and the CAN/wire backend end-to-end. OMG IDL and ROS 2 .msg/.srv frontends, and a J1939-PGN consumer of the generated types, are foreseen but out of scope this round; the architecture keeps them net-additive (see Anti-goals and cross-cutting traceability).

The umbrella decomposes into five capability clusters, each on its own page (see the toctree): the bounded message-type IR (Bounded message-type IR (FEAT_0111)), the serde-free wire runtime (serde-free no_std wire runtime (FEAT_0112)), the DBC frontend (DBC frontend (FEAT_0113)), the plane-generic codegen (Plane-generic codegen (FEAT_0114)), and the CAN/DBC backend (CAN/DBC backend (FEAT_0115)). The deliberately deferred anti-goals live on Anti-goals and cross-cutting traceability.

Top-level umbrella

Feature: Message-plane interface-description codegen FEAT_0110
status: implemented

A layered set of Rust crates that consumes interface descriptions and emits strongly-typed message (de)serializers at build time. The toolchain is organised as layers that depend only leftwards:

  1. IR coretaktora-idl-core: the bounded message-type IR (structs, enums, bounded sequences, services). std baseline. Knows no wire format, no DBC, no target language. The message-plane twin of fieldbus-od-core.

  2. Wire runtimetaktora-idl-wire: the WireType trait the generated code implements, plus CAN signal bit-packing primitives. no_std, allocation-free, dependency-free, no serde. This is the only layer that links into a runtime consumer.

  3. Frontendtaktora-idl-dbc: parses .dbc text into a typed model and lowers it onto an idl-core Module plus a physical-layout sidecar. Depends on idl-core.

  4. Codegen layertaktora-idl-codegen (naming policy, the MessageBackend trait, and resolve + generate; plane-generic, knows no wire format) plus taktora-idl-codegen-can (the one concrete backend this round, emitting WireType impls per the DBC layout).

  5. Verification harnesstaktora-idl-codegen-can-tests (publish = false): generates WireType code from a fixture DBC at build time and round-trips it.

The delivered slice is the IR plus the DBC frontend and CAN backend. Additional frontends (OMG IDL, ROS 2) and a J1939 consumer are net-additive follow-ons (see Anti-goals and cross-cutting traceability).

Requirements at a glance

Used filter:

ID

Title

Status

Satisfies

FEAT_0111

Bounded message-type IR

implemented

FEAT_0110

FEAT_0112

serde-free no_std wire runtime

implemented

FEAT_0110

FEAT_0113

DBC frontend

implemented

FEAT_0110

FEAT_0114

Plane-generic codegen

implemented

FEAT_0110

FEAT_0115

CAN/DBC backend

implemented

FEAT_0110

REQ_0945

NO runtime description parsing

rejected

FEAT_0110

REQ_0946

Boundedness is unrepresentable to violate

implemented

FEAT_0111

REQ_0947

Structural validation before sizing

implemented

FEAT_0111

REQ_0948

Plane-generic, policy-free IR

implemented

FEAT_0111

REQ_0949

WireType trait surface

implemented

FEAT_0112

REQ_0950

no_std, allocation-free, serde-free path

implemented

FEAT_0112

REQ_0951

CAN signal bit-packing primitives

implemented

FEAT_0112

REQ_0952

DBC parse to a typed model

implemented

FEAT_0113

REQ_0953

DBC lower to IR plus layout sidecar

implemented

FEAT_0113

REQ_0954

Deterministic naming policy with collision detection

implemented

FEAT_0114

REQ_0955

MessageBackend trait and resolve/generate entry point

implemented

FEAT_0114

REQ_0956

CAN backend emits WireType impls via the wire runtime

implemented

FEAT_0115

REQ_0957

Build-time generation proof-of-life

implemented

FEAT_0115

REQ_0958

NO additional frontends this round

rejected

FEAT_0110

REQ_0959

NO bool or float CAN fields this round

rejected

FEAT_0110

REQ_0960

NO J1939 application-layer consumer this round

rejected

FEAT_0110