Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Build protoc from source
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyera Eulberg committed Aug 2, 2022
1 parent 18acc08 commit 8fd5e8a
Show file tree
Hide file tree
Showing 7 changed files with 75 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.

19 changes: 19 additions & 0 deletions programs/bpf/Cargo.lock

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

25 changes: 25 additions & 0 deletions storage-bigtable/build-proto/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 storage-bigtable/build-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ version = "1.11.5"
[workspace]

[dependencies]
protobuf-src = "1.0.5"
tonic-build = "0.8.0"
5 changes: 5 additions & 0 deletions storage-bigtable/build-proto/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
fn main() -> Result<(), std::io::Error> {
const PROTOC_ENVAR: &str = "PROTOC";
if std::env::var(PROTOC_ENVAR).is_err() {
std::env::set_var(PROTOC_ENVAR, protobuf_src::protoc());
}

let manifest_dir = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));

let out_dir = manifest_dir.join("../proto");
Expand Down
1 change: 1 addition & 0 deletions storage-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ name = "solana_storage_proto"
targets = ["x86_64-unknown-linux-gnu"]

[build-dependencies]
protobuf-src = "1.0.5"
tonic-build = "0.8.0"
5 changes: 5 additions & 0 deletions storage-proto/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
fn main() -> Result<(), std::io::Error> {
const PROTOC_ENVAR: &str = "PROTOC";
if std::env::var(PROTOC_ENVAR).is_err() {
std::env::set_var(PROTOC_ENVAR, protobuf_src::protoc());
}

let proto_base_path = std::path::PathBuf::from("proto");
let proto_files = ["confirmed_block.proto", "transaction_by_addr.proto"];
let mut protos = Vec::new();
Expand Down

0 comments on commit 8fd5e8a

Please sign in to comment.