diff --git a/Cargo.lock b/Cargo.lock index edc521e1c..29f72be6e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3826,6 +3826,56 @@ 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" @@ -4746,6 +4796,7 @@ dependencies = [ "home", "prost", "prost-types", + "protoc-bin-vendored", "shuttle-common", "tokio", "tonic", diff --git a/proto/Cargo.toml b/proto/Cargo.toml index eb633ae31..11a2836f5 100644 --- a/proto/Cargo.toml +++ b/proto/Cargo.toml @@ -22,4 +22,5 @@ workspace = true features = ["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 685a01573..3761649ff 100644 --- a/proto/build.rs +++ b/proto/build.rs @@ -1,4 +1,10 @@ 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(()) diff --git a/runtime/tests/resources/axum-wasm-expanded/Cargo.toml b/runtime/tests/resources/axum-wasm-expanded/Cargo.toml index 7972f7b6c..45f77cbe1 100644 --- a/runtime/tests/resources/axum-wasm-expanded/Cargo.toml +++ b/runtime/tests/resources/axum-wasm-expanded/Cargo.toml @@ -10,5 +10,5 @@ crate-type = [ "cdylib" ] [dependencies] futures = "0.3.25" -shuttle-next = { path = "../../../../next" } +shuttle-next = { path = "../../../../services/shuttle-next" } tracing = "0.1.37"