mirror of
https://github.com/logos-messaging/chat_proto.git
synced 2026-01-06 23:13:06 +00:00
added logging to build
This commit is contained in:
parent
ba3b90407f
commit
533bd31357
@ -4,21 +4,27 @@ use std::env;
|
|||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
fn get_proto_dir() -> PathBuf {
|
fn get_proto_dir() -> PathBuf {
|
||||||
|
println!(
|
||||||
|
"Manifest dir: {:?}",
|
||||||
|
env::var("CARGO_MANIFEST_DIR").unwrap()
|
||||||
|
);
|
||||||
// protos are stored in ../../proto/
|
// protos are stored in ../../proto/
|
||||||
let mut proto_root_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
|
let mut proto_root_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
|
||||||
proto_root_dir.pop();
|
proto_root_dir.pop();
|
||||||
proto_root_dir.pop();
|
proto_root_dir.pop();
|
||||||
|
|
||||||
|
println!("proto_dir: {:?}", proto_root_dir);
|
||||||
proto_root_dir
|
proto_root_dir
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut config = prost_build::Config::new();
|
let mut config = prost_build::Config::new();
|
||||||
|
|
||||||
// Create mod file to maintain import hierarchy
|
// Create mod file to maintain import hierarchy
|
||||||
config.include_file("mod.rs");
|
config.include_file("mod.rs");
|
||||||
|
|
||||||
|
config
|
||||||
config.compile_protos(
|
.compile_protos(
|
||||||
&[
|
&[
|
||||||
"proto/umbra/base.proto",
|
"proto/umbra/base.proto",
|
||||||
"proto/umbra/common_frames.proto",
|
"proto/umbra/common_frames.proto",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user