diff --git a/common/build.rs b/common/build.rs index 36201cb..7e3848a 100644 --- a/common/build.rs +++ b/common/build.rs @@ -1,10 +1,10 @@ -// build.rs +// common/build.rs fn main() -> Result<(), Box> { tonic_build::configure() .build_server(true) .out_dir("src/proto") .file_descriptor_set_path("src/proto/descriptor.bin") - .compile( + .compile_protos( // Changed from .compile() &[ "proto/common.proto", "proto/adresar.proto", diff --git a/common/src/lib.rs b/common/src/lib.rs index 6648ddb..b57d98f 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -1,15 +1,20 @@ -// src/lib.rs +// common/src/lib.rs pub mod proto { - pub mod multieko2_adresar { - include!("proto/multieko2.adresar.rs"); - } - pub mod multieko2_common { - include!("proto/multieko2.common.rs"); - } - pub mod multieko2_table_structure { - include!("proto/multieko2.table_structure.rs"); - } - pub mod multieko2_uctovnictvo { - include!("proto/multieko2.uctovnictvo.rs"); + pub mod multieko2 { + pub mod adresar { + include!("proto/multieko2.adresar.rs"); + } + pub mod common { + include!("proto/multieko2.common.rs"); + } + pub mod table_structure { + include!("proto/multieko2.table_structure.rs"); + } + pub mod uctovnictvo { + include!("proto/multieko2.uctovnictvo.rs"); + } + pub const FILE_DESCRIPTOR_SET: &[u8] = + include_bytes!("proto/descriptor.bin"); } } + diff --git a/server/src/main.rs b/server/src/main.rs index fad82cc..e6d4524 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -1,7 +1,7 @@ // src/main.rs use std::env; use dotenvy::dotenv; -use multieko2::db; +use crate::db; #[tokio::main] async fn main() -> Result<(), Box> {