From 5e1e527954c30b4f8bf4042d60c9c83df1e8f385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oddbj=C3=B8rn=20Gr=C3=B8dem?= <29732646+oddgrd@users.noreply.github.com> Date: Fri, 17 Mar 2023 15:08:26 +0000 Subject: [PATCH] refactor: pull out vendored protoc from shuttle-proto (#726) * feat: use grpcio to avoid needing protoc * refactor: remove vendored protoc, revert to tonic otlp --- Cargo.lock | 55 ++---------------------------------------------- proto/Cargo.toml | 1 - proto/build.rs | 6 ------ 3 files changed, 2 insertions(+), 60 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d9b5b06c9..eca8b29e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3827,56 +3827,6 @@ dependencies = [ "prost", ] -[[package]] -name = "protoc-bin-vendored" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "005ca8623e5633e298ad1f917d8be0a44bcf406bf3cde3b80e63003e49a3f27d" -dependencies = [ - "protoc-bin-vendored-linux-aarch_64", - "protoc-bin-vendored-linux-ppcle_64", - "protoc-bin-vendored-linux-x86_32", - "protoc-bin-vendored-linux-x86_64", - "protoc-bin-vendored-macos-x86_64", - "protoc-bin-vendored-win32", -] - -[[package]] -name = "protoc-bin-vendored-linux-aarch_64" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb9fc9cce84c8694b6ea01cc6296617b288b703719b725b8c9c65f7c5874435" - -[[package]] -name = "protoc-bin-vendored-linux-ppcle_64" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d2a07dcf7173a04d49974930ccbfb7fd4d74df30ecfc8762cf2f895a094516" - -[[package]] -name = "protoc-bin-vendored-linux-x86_32" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54fef0b04fcacba64d1d80eed74a20356d96847da8497a59b0a0a436c9165b0" - -[[package]] -name = "protoc-bin-vendored-linux-x86_64" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8782f2ce7d43a9a5c74ea4936f001e9e8442205c244f7a3d4286bd4c37bc924" - -[[package]] -name = "protoc-bin-vendored-macos-x86_64" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5de656c7ee83f08e0ae5b81792ccfdc1d04e7876b1d9a38e6876a9e09e02537" - -[[package]] -name = "protoc-bin-vendored-win32" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9653c3ed92974e34c5a6e0a510864dab979760481714c172e0a34e437cb98804" - [[package]] name = "psm" version = "0.1.21" @@ -4797,7 +4747,6 @@ dependencies = [ "home", "prost", "prost-types", - "protoc-bin-vendored", "shuttle-common", "tokio", "tonic", @@ -6001,9 +5950,9 @@ dependencies = [ [[package]] name = "urlencoding" -version = "2.1.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b90931029ab9b034b300b797048cf23723400aa757e8a2bfb9d748102f9821" +checksum = "e8db7427f936968176eaa7cdf81b7f98b980b18495ec28f1b5791ac3bfe3eea9" [[package]] name = "utf-8" diff --git a/proto/Cargo.toml b/proto/Cargo.toml index 5180b1034..2a03c17b6 100644 --- a/proto/Cargo.toml +++ b/proto/Cargo.toml @@ -23,5 +23,4 @@ workspace = true features = ["claims", "error", "service", "wasm"] [build-dependencies] -protoc-bin-vendored = "3.0.0" tonic-build = "0.8.3" diff --git a/proto/build.rs b/proto/build.rs index 3761649ff..685a01573 100644 --- a/proto/build.rs +++ b/proto/build.rs @@ -1,10 +1,4 @@ fn main() -> Result<(), Box> { - let protoc = protoc_bin_vendored::protoc_bin_path().unwrap(); - let protoc_include = protoc_bin_vendored::include_path().unwrap(); - - std::env::set_var("PROTOC", protoc); - std::env::set_var("PROTOC_INCLUDE", protoc_include); - tonic_build::configure().compile(&["./provisioner.proto", "./runtime.proto"], &["./"])?; Ok(())