samcrow / canadensis

A Rust implementation of Cyphal
Apache License 2.0
44 stars 5 forks source link

Data type generation using Nunavut #4

Open samcrow opened 3 years ago

samcrow commented 3 years ago

All the data type definitions and serialization code are hand-written. The existing Nunavut tool can automatically generate code for some languages. With some changes, it could also generate Rust code for use with canadensis_encoding.

Before embarking on that, we should decide if the ReadCursor/WriteCursor definitions need any changes.

samcrow commented 2 years ago

Now that we have canadensis_codegen_rust to automatically generate code, this is not so critical.

pavel-kirienko commented 2 years ago

YSK that there is currently work underway on Rust code generation in Nunavut: https://forum.uavcan.org/t/uavcan-rs-v1-progress-tracking/1430?u=pavel.kirienko

You would be most welcome to join the discussion. Nunavut is designed to generate code that is completely agnostic of the implementation library that it is going to be used with; that is, the expectation is that one could use such Nunavut-generated Rust code with either Canadensis or uavcan.rs with no changes.