technocreatives / dbc-codegen

Generate Rust structs for messages from a dbc (CAN bus definition) file.
Apache License 2.0
43 stars 23 forks source link

Make this a library, addresses #11 #16

Closed marcelbuesing closed 3 years ago

marcelbuesing commented 3 years ago
andresv commented 3 years ago

This is excellent, just what I need.

killercup commented 3 years ago

Nice! Can we still keep a small main.rs around? Maybe in a dbc-codegen-cli crate to not have the cli dependencies. I'd rather check in the generated code myself than doing the build.rs dance :)

Want me to contribute to this branch? I have some time to fiddle with this :)

marcelbuesing commented 3 years ago

Sure feel free to change everything! I think moving the bin part to a separate crate is certainly an option.

killercup commented 3 years ago

Done! Based on your stuff, there's now a -cli crate, and I did everything from your checklist except adding convenience functions for buffer/path handling.

marcelbuesing commented 3 years ago

Awesome! Actually I think the thiserror checkpoint can be ignored. Thanks for also publishing it to crates.io really happy to see that. That should make using it quite convenient. cargo install dbc-codegen-cli FTW.