diff --git a/Cargo.lock b/Cargo.lock index 7f6207b8..137dc70b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2511,6 +2511,7 @@ dependencies = [ "bytes", "prost 0.12.3", "prost-types 0.12.3", + "protobuf-src", "solana-perf", "solana-sdk", "tonic 0.10.2", diff --git a/Cargo.toml b/Cargo.toml index 37cc3934..49181688 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,6 +40,7 @@ once_cell = "1" openssl = "0.10.51" prost = "0.12.1" prost-types = "0.12.1" +protobuf-src = "1.1.0" quinn = "0.9" rand = "0.8.5" rayon = "1.7.0" diff --git a/jito-protos/Cargo.toml b/jito-protos/Cargo.toml index e221325b..0d29b1e8 100644 --- a/jito-protos/Cargo.toml +++ b/jito-protos/Cargo.toml @@ -13,4 +13,5 @@ solana-sdk = { workspace = true } tonic = { workspace = true } [build-dependencies] +protobuf-src = { workspace = true } tonic-build = { workspace = true } diff --git a/jito-protos/build.rs b/jito-protos/build.rs index fe900051..a8e6e615 100644 --- a/jito-protos/build.rs +++ b/jito-protos/build.rs @@ -1,6 +1,12 @@ use tonic_build::configure; fn main() { + const PROTOC_ENVAR: &str = "PROTOC"; + if std::env::var(PROTOC_ENVAR).is_err() { + #[cfg(not(windows))] + std::env::set_var(PROTOC_ENVAR, protobuf_src::protoc()); + } + configure() .compile( &[ diff --git a/jito-protos/protos b/jito-protos/protos index 39a09675..23ec2e4a 160000 --- a/jito-protos/protos +++ b/jito-protos/protos @@ -1 +1 @@ -Subproject commit 39a0967507d2e5cf45b576039f052fc55095e45a +Subproject commit 23ec2e4a74d9a3fcc193069ff1d1ac1cee699fdc