Skip to content

Commit 744a8da

Browse files
committed
handle new proto structure
1 parent 331e53b commit 744a8da

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

build.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
2727
// Make all messages serde-serializable.
2828
.type_attribute(".", "#[derive(serde::Serialize,serde::Deserialize)]")
2929
// Compiling protos using path on build time.
30-
.compile_protos(&["proto/v2/core/proxy.proto"], &["proto/v2/core"])?;
30+
.compile_protos(
31+
&["proto/v2/proxy.proto", "proto/common/client_types.proto"],
32+
&["proto"],
33+
)?;
3134

3235
println!("cargo:rerun-if-changed=proto");
3336
Ok(())

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,15 @@ pub(crate) mod generated {
2323
tonic::include_proto!("defguard.proxy.v2");
2424
}
2525
}
26+
27+
pub mod client_types {
28+
tonic::include_proto!("defguard.client_types");
29+
}
2630
}
2731
}
2832

2933
pub(crate) mod proto {
34+
pub(crate) use crate::generated::defguard::client_types::*;
3035
pub(crate) use crate::generated::defguard::proxy::v2::*;
3136
}
3237

0 commit comments

Comments
 (0)