Bug Report
Version
tonic v0.14.5
grpc v0.9.0-alpha.1
grpc-protobuf v0.9.0-alpha.1
grpc-protobuf-build v0.9.0-alpha.1
Platform
Windows 64-bit
rustc 1.88.0
cargo 1.88.0
Crates
grpc-protobuf-build
interop
Description
While building the interop crate on Windows, I ran into issues around resolving the bundled protoc / protoc-gen-rust-grpc binaries from grpc-protobuf-build.
The current helper functions construct tool paths as strings, which can be fragile across platforms. On Windows, making the paths explicit using PathBuf and appending the .exe suffix correctly allowed the build to locate the intended binaries and generate the expected outputs.
I expected the bundled tool paths to be constructed in a platform-safe way.
A possible improvement would be to construct these paths using PathBuf, for example:
PathBuf::from(env!("OUT_DIR"))
.join("bin")
.join(if cfg!(windows) { "protoc.exe" } else { "protoc" })
The same can be applied to the protoc-gen-rust-grpc plugin
Happy to open a PR if this approach aligns with the intended design.
Bug Report
Version
tonic v0.14.5grpc v0.9.0-alpha.1grpc-protobuf v0.9.0-alpha.1grpc-protobuf-build v0.9.0-alpha.1Platform
Windows 64-bit
rustc 1.88.0cargo 1.88.0Crates
grpc-protobuf-buildinteropDescription
While building the
interopcrate on Windows, I ran into issues around resolving the bundledprotoc/protoc-gen-rust-grpcbinaries fromgrpc-protobuf-build.The current helper functions construct tool paths as strings, which can be fragile across platforms. On Windows, making the paths explicit using
PathBufand appending the.exesuffix correctly allowed the build to locate the intended binaries and generate the expected outputs.I expected the bundled tool paths to be constructed in a platform-safe way.
A possible improvement would be to construct these paths using
PathBuf, for example:The same can be applied to the protoc-gen-rust-grpc plugin
Happy to open a PR if this approach aligns with the intended design.