zerodds-build should not generate the impl blocks itself. Instead, it should rely directly on #[derive(DdsType)], generating only the struct(s) and enum(s) without any implementation blocks. This would make cdr-derive the single source of truth for DDS types.
This follows the same approach used by prost-build, which generates only struct(s) and enum(s) with the appropriate #[derive(...)]. Then, the impl(s) are provided by prost-derive.
Moreover, cdr-derive needs to be extended with several features (such as extensibility and other attributes).
zerodds-buildshould not generate theimplblocks itself. Instead, it should rely directly on#[derive(DdsType)], generating only thestruct(s) andenum(s) without any implementation blocks. This would makecdr-derivethe single source of truth for DDS types.This follows the same approach used by
prost-build, which generates onlystruct(s) andenum(s) with the appropriate#[derive(...)]. Then, theimpl(s) are provided byprost-derive.Moreover,
cdr-deriveneeds to be extended with several features (such as extensibility and other attributes).