* Use protobufs to store confirmed blocks in BigTable
* Cleanup
* Reorganize proto
* Clean up use statements
* Split out function for unit testing
* s/utils/convert
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
(cherry picked from commit ce598c5c98
)
Co-authored-by: Justin Starry <justin@solana.com>
36 lines
1.1 KiB
Rust
36 lines
1.1 KiB
Rust
fn main() -> Result<(), std::io::Error> {
|
|
let manifest_dir = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
|
|
|
let out_dir = manifest_dir.join("../proto");
|
|
let googleapis = manifest_dir.join("googleapis");
|
|
|
|
println!("Google API directory: {}", googleapis.display());
|
|
println!("output directory: {}", out_dir.display());
|
|
|
|
tonic_build::configure()
|
|
.build_client(true)
|
|
.build_server(false)
|
|
.format(true)
|
|
.out_dir(&out_dir)
|
|
.compile(
|
|
&[googleapis.join("google/bigtable/v2/bigtable.proto")],
|
|
&[googleapis],
|
|
)?;
|
|
|
|
let out_dir = manifest_dir.join("../proto");
|
|
let proto_files = manifest_dir.join("../src");
|
|
|
|
println!("Protobuf directory: {}", proto_files.display());
|
|
println!("output directory: {}", out_dir.display());
|
|
|
|
tonic_build::configure()
|
|
.build_client(true)
|
|
.build_server(false)
|
|
.format(true)
|
|
.out_dir(&out_dir)
|
|
.compile(
|
|
&[proto_files.join("confirmed_block.proto")],
|
|
&[proto_files],
|
|
)
|
|
}
|