Skip to content

Commit

Permalink
twiq: Fix crates/db/build.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya committed Oct 26, 2022
1 parent 5b66fcc commit b96dc52
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions twiq/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 twiq/crates/db/Cargo.toml
Expand Up @@ -28,4 +28,5 @@ uuid = { version = "1.1.2", features = ["v4"] }
tokio = { version = "1.20.1", features = ["full"] }

[build-dependencies]
prost-build = "0.11.1"
tonic-build = "0.8.2"
10 changes: 9 additions & 1 deletion twiq/crates/db/build.rs
@@ -1,17 +1,25 @@
use std::{fs, path::Path};

use prost_build::Config;

fn main() {
// brew install protobuf
let out_dir = Path::new("src/firestore_rpc");
if out_dir.exists() {
fs::remove_dir_all(&out_dir).unwrap();
}
fs::create_dir_all(&out_dir).unwrap();
let mut config = Config::new();
config.disable_comments(&[
"google.api.HttpRule",
"google.firestore.v1.StructuredQuery.start_at",
]);
tonic_build::configure()
.build_client(true)
.build_server(false)
.out_dir(out_dir)
.compile(
.compile_with_config(
config,
&["proto/googleapis/google/firestore/v1/firestore.proto"],
&["proto/googleapis"],
)
Expand Down

0 comments on commit b96dc52

Please sign in to comment.