-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
The driver currently only appends the platforms field to the handshake metadata when version_check::triple(), which we use to check the Rust version the user is using, returns a non-null value.
However, there are some limitations with that crate:
The version is queried by calling the Rust compiler with --version. The path to the compiler is determined first via the RUSTC environment variable. If it is not set, then rustc is used. If that fails, no determination is made, and calls return None.
This presents a couple of different problems for us:
1. Many of our users deploy Rust binaries somewhere differently from where they were compiled, and don't even install Rust wherever their binary is deployed.
2. This could report an incorrect value because the current Rust version being used on a machine doesn't necessarily have to match the version used to compile any binaries currently being run there.
Instead, we should switch to using rustc_version_runtime (https://crates.io/crates/rustc_version_runtime) which uses a build script to store the version at compile time and then allows us to read that version at runtime.