I am using rsgen-avro at work for Rust code generation based on Avro schema files. The application we are building is for an IoT system that is run on a custom Yocto linux build. We are using rsgen-avro as a library (we do not use the generated CLI binary). The issue with the rsgen-avro>=0.12.0 is the dependency on clap@4. Since the latter installs the most recent version, which is clap@4.4.1 as of today, it requires at least Rust 1.70 to compile. Unfortunately, the latest supported Rust version on Yocto today is 1.68 (see [1] and [2]).
With the current structure of the package, we are stuck on rsgen-avro@0.11.1 until Yocto project supports at least Rust 1.70. We would greatly benefit from using the latest version, rsgen-avro>=0.12.2, but this requires modifying slightly the package structure.
With this change I propose to split the binary generation from the library crate using a feature flag. One can still generate the binary, if needed (and it will be done by the CI/CD pipeline), but the benefit is that the library crate does not depend on clap@4 and therefore any other package that uses rsgen-avro as a library skips installing clap as dependency.
I am using
rsgen-avro
at work for Rust code generation based on Avro schema files. The application we are building is for an IoT system that is run on a custom Yocto linux build. We are usingrsgen-avro
as a library (we do not use the generated CLI binary). The issue with thersgen-avro>=0.12.0
is the dependency onclap@4
. Since the latter installs the most recent version, which isclap@4.4.1
as of today, it requires at least Rust 1.70 to compile. Unfortunately, the latest supported Rust version on Yocto today is 1.68 (see [1] and [2]).With the current structure of the package, we are stuck on
rsgen-avro@0.11.1
until Yocto project supports at least Rust 1.70. We would greatly benefit from using the latest version,rsgen-avro>=0.12.2
, but this requires modifying slightly the package structure.With this change I propose to split the binary generation from the library crate using a feature flag. One can still generate the binary, if needed (and it will be done by the CI/CD pipeline), but the benefit is that the library crate does not depend on
clap@4
and therefore any other package that usesrsgen-avro
as a library skips installingclap
as dependency.[1] https://docs.yoctoproject.org/dev/migration-guides/release-notes-4.2.html [2] https://wiki.yoctoproject.org/wiki/Releases