Make common a proper library: add [lib], src/lib.rs, clean up build.rs
This commit is contained in:
parent
c1580fb2bf
commit
6d335b6968
@ -10,3 +10,7 @@ prost = "0.12"
|
||||
|
||||
[build-dependencies]
|
||||
tonic-build = "0.11"
|
||||
|
||||
[lib]
|
||||
name = "navka_common"
|
||||
path = "src/lib.rs"
|
||||
|
||||
@ -1,8 +1,3 @@
|
||||
fn main() {
|
||||
tonic_build::configure()
|
||||
.build_client(true)
|
||||
.build_server(true)
|
||||
.out_dir("src/")
|
||||
.compile(&["proto/navka.proto"], &["proto"])
|
||||
.unwrap();
|
||||
tonic_build::compile_protos("proto/navka.proto").unwrap();
|
||||
}
|
||||
|
||||
4
common/src/lib.rs
Normal file
4
common/src/lib.rs
Normal file
@ -0,0 +1,4 @@
|
||||
// Re-export the code generated by build.rs (navka.rs, relay.rs, etc.)
|
||||
pub mod navka {
|
||||
include!(concat!(env!("OUT_DIR"), "/navka.rs"));
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user