eclipse-iceoryx / iceoryx2

Eclipse iceoryx2™ - true zero-copy inter-process-communication in pure Rust
https://iceoryx.io
Apache License 2.0
1.03k stars 40 forks source link

Use an alternative approach to make version available in `PackageVersion` #475

Closed elfenpiff closed 1 month ago

elfenpiff commented 1 month ago

Brief feature description

Currently, the iceoryx2_bb_elementary::PackageVersion uses the env variables CARGO_PKG_VERSION_{MAJOR|MINOR|PATCH} to acquire the crate version. This is essential, since this number is also stored in every shared memory construct to prevent a communication between incompatible iceoryx2 versions. Sadly, those env variables are not set by Bazel and depend on the deployed environment that does not have to be cargo. Therefore, we need a method to set the iceoryx2 version number in code and ensure that it is consistent with CARGO_PKG_VERSION_** stuff.