Skip to content

Migrate Perl CANfigurator Parsers To Rust - #553

Draft
coderask wants to merge 1 commit into
normalize-null-fieldsfrom
migrate-perl-to-rust
Draft

Migrate Perl CANfigurator Parsers To Rust#553
coderask wants to merge 1 commit into
normalize-null-fieldsfrom
migrate-perl-to-rust

Conversation

@coderask

Copy link
Copy Markdown
Contributor

Summary

Replace all six Perl CANdo parsers with a single Rust binary (canfigurator) that reads GRCAN.CANdo once via serde_yaml and emits every generated artifact in one pass.

Stack

This PR is stacked on:

Those PRs clean up CANdo format quirks so the Rust parser targets a consistent YAML schema.

What This Replaces

Perl Parser Output
BusParser.pl (151 lines) GRCAN_BUS_ID.h
GRparser.pl (224 lines) GRCAN_NODE_ID.h
MSGparser.pl (129 lines) GRCAN_MSG_ID.h
CANparser.pl (241 lines) GRCAN_CUSTOM_ID.h
STRUCTparser.pl (370 lines) GRCAN_MSG_DATA.h
DBCparser.pl (943 lines) GRCAN_{Bus}.dbc × 3

Total: 2,058 lines of Perl → single Rust binary

Approach

  1. Parse GRCAN.CANdo with serde_yaml into typed Rust structs
  2. Validate (duplicate detection, DLC ranges, routing consistency) — solves Autogen And GRCAN.CANdo Lack Testing #375 and GRparser.pl Has No Duplicate Checking #373
  3. Emit byte-identical output to current Perl parsers (verified by golden-file tests)
  4. Run in parallel CI alongside Perl, then cut over

Status

🚧 Draft — work in progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant