Skip to content

Commit

Permalink
use protobuf-src for building
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalu committed Jan 8, 2024
1 parent 67d5028 commit 35232e2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ lru = "0.12.0"
once_cell = "1.17.1"
prost = "0.12.1"
prost-types = "0.12.1"
protobuf-src = "1.1.0"
rand = "0.8"
serde = "1.0.160"
serde_derive = "1.0.160"
Expand Down
1 change: 1 addition & 0 deletions proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ solana-transaction-status = { workspace = true }
tonic = { workspace = true }

[build-dependencies]
protobuf-src = { workspace = true }
tonic-build = { workspace = true }

[dev-dependencies]
Expand Down
6 changes: 6 additions & 0 deletions proto/build.rs
Original file line number Diff line number Diff line change
@@ -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()
.type_attribute(
"TransactionErrorType",
Expand Down

0 comments on commit 35232e2

Please sign in to comment.