TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 230 subscribers
Post #25174 18
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/vehicle
can --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
Google Docs dbc-codegen2 (Rust) Hello, we are Pavel and Rasmus, students from TalTech University, Estonia. The topic of our bachelor's thesis is writing a dbc-based Rust and C++ code generator. The result of our work is called dbc-codegen2 and can be found on github: https://github.com/iColgateZz/dbc…
More from @r_cpp
  1. Oct 3, 2026[PLDI'26] Persistent Iterators with Value Semantics https://www.youtube.com/watch?v=cq33C5…
  2. Oct 3, 2026A Cross-Toolkit Timeline Control, Wed, Oct 14, 2026, 6:00 PM https://www.meetup.com/utah-c…
  3. Oct 3, 2026Upcoming C++ User Group meetings in October https://meetingcpp.com/meetingcpp/news/items/U…
  4. Oct 3, 2026Transcoding UTF-8 to UTF-16 with replacement at gigabytes per second https://lemire.me/blo…
  5. Oct 3, 2026EDG C++ fronted now released as open source https://edgcpp.org/#transition https://redd.it…
  6. Oct 3, 2026Arno Lepisk: Linux shared libraries https://youtu.be/IJASMkkGco8 https://redd.it/1wuvxmh @…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →