DBC -> strongly typed Rust/C++ CAN codegen for my bachelor's thesis: feedback wanted
Hey r/cpp,
For my bachelor's thesis, we have been working on dbc-codegen2, an open-source Rust library + CLI that turns DBC files into strongly typed CAN frame code for Rust or C++.
It generates message structs/classes, typed getters/setters, value enums, encode/decode helpers, frame ID and payload length checks, mux handling, and optional generated tests.
dbc-codegen2 gen vehicle.dbc -o generated/vehiclecan --lang rust --test
dbc-codegen2 gen vehicle.dbc -o generated/vehiclecan --lang cpp --test
We are looking for feedback from people using CAN, and especially DBC files, in their projects.
What is missing? What is annoying?
If you have time, we also made two surveys with 4 hands-on tasks each. They take about 25 minutes, so if that is too much, any feedback in the comments is also very welcome:
Rust code generation: [https://forms.gle/9r77YjNDfSXQYRJC6](https://forms.gle/9r77YjNDfSXQYRJC6)
C++ code generation: https://forms.gle/xZQrV4Am4drb7PCx8
Repo/crate: https://github.com/iColgateZz/dbc-codegen2
Disclosure: I am one of the people building it, and this is part of my bachelor's thesis. Not trying to do a drive-by ad; comments with blunt feedback are just as useful as survey responses.
https://redd.it/1taadno
@r_cpp
Post #25174
18