我正在使用 Tonic实现 gRPC 客户端和服务器。我有两个模块,每个模块取决于另一个模块原型文件。当我尝试在 tonic 构建中提供 proto 文件的路径时,我遇到了一个问题。下面是我的 tonic 构建的文件夹结构和代码。
-organization
-src
-client
-mod.rs
-service
-cargo.toml
-Employee
-src
-service
-proto
-proto_file
-cargo.toml
pub mod Employee_info {
tonic::include_proto!("{path}/employee_info.proto"); //this is organisation `mod file`. i want to pass the proto file path of employee folder->proto->proto file.
}