Skip to content

Commit

Permalink
move protos under messages
Browse files Browse the repository at this point in the history
  • Loading branch information
kvc0 committed Aug 12, 2024
1 parent 9d1a4c8 commit 0b8d2fb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions rmemstore-messages/build.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
#[allow(clippy::unwrap_used)]
fn main() {
let proto_dir = "../proto";
let proto_dir = "proto";

prost_build::Config::new()
.bytes([
".rmemstore.Value.blob",
".rmemstore.Get.blob",
".rmemstore.Put.key",
".rmemstore.Get.key",
])
.protoc_arg("--python_out=pyi_out:../example-python")
.out_dir("./src")
.compile_protos(&["../proto/rmemstore.proto"], &[proto_dir])
let mut config = prost_build::Config::new();
config.bytes([
".rmemstore.Value.blob",
".rmemstore.Get.blob",
".rmemstore.Put.key",
".rmemstore.Get.key",
]);
config.out_dir("./src");

if std::env::var("CI").is_ok() {
eprintln!("skipping python output");
} else {
eprintln!("adding python output");
config.protoc_arg("--python_out=pyi_out:../example-python/");
}
config
.compile_protos(&["./proto/rmemstore.proto"], &[proto_dir])
.unwrap();

println!("cargo:rerun-if-changed={proto_dir}");
Expand Down
File renamed without changes.

0 comments on commit 0b8d2fb

Please sign in to comment.