How to consider supporting Rust
rust is a popular language than before, how to consider supporting Rust
If you want to try adding rust support (I assume for code generation), you can have a look at c_source.py. You would fork cantools, copy c_source.py, name it rust_source.py and implement your rust generator there in a similar fashion.
For integration, you also need to add a rust subparser ultimately.
When that is done you can write tests to make sure your generator code is covered and remains in good working order.
Lastly, you issue a pull request to this project.
It is a neat project to step into this.
For DBC files, there’s already an existing project - dbc-codegen - written entirely in Rust. The code generation can be nicely integrated into build.rs. Just not sure what features it misses compared to cantools.
Several of us just started OxiBUS github org to implement Rust low level comm libraries. It's a community-driven volunteer open source initiative. Several projects already onboarded, and I am working to onboard more:
In progress
- can-dbc - well know parser with good following
On-boarder
- automotive_diag by @nyurik (me) - onboarded - definitions for UDS/KWP2000/OBD-II/DoIP/...
- dbc-data by @tegimeki - onboarded - simple codegen
- MDGSF/rdbc - onboarded - a thorough DBC parser - merging it with can-dbc might prove a very good path forward.
I would love to join forces with dbc-codegen and possibly others so that std, no-std, and perhaps other approaches could be generated and experimented with. Everyone with good github history is welcome to join :)