Add gRPC support with tonic and protobuf integration

This commit is contained in:
Noor 2024-12-23 18:26:50 +05:30
parent 3ea2780f7b
commit e643da298f
4 changed files with 981 additions and 2 deletions

970
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -8,3 +8,7 @@ base64 = "0.22.1"
prost = "0.13.4"
serde = { version = "1.0.216", features = ["derive"] }
serde_yml = "0.0.12"
tonic = "0.12.3"
[build-dependencies]
tonic-build = "0.12.3"

5
build.rs Normal file

@ -0,0 +1,5 @@
fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::compile_protos("proto/manager_protobuf.proto")?;
Ok(())
}

@ -1,3 +1,7 @@
pub mod pb {
tonic::include_proto!("dtpm_proto");
}
pub mod config {
use base64::{engine::general_purpose::STANDARD as BASE64, Engine};
use serde::{Deserialize, Serialize};