Include proto macros (#13)
This commit is contained in:
committed by
Lucio Franco
parent
49872ce904
commit
3edaa424d9
@@ -54,7 +54,7 @@ $ cargo +beta build
|
||||
|
||||
```rust
|
||||
pub mod hello_world {
|
||||
include!(concat!(env!("OUT_DIR"), "/helloworld.rs"));
|
||||
tonic::include_proto!("helloworld");
|
||||
}
|
||||
|
||||
use hello_world::{client::GreeterClient, HelloRequest};
|
||||
@@ -81,7 +81,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
use tonic::{transport::Server, Request, Response, Status};
|
||||
|
||||
pub mod hello_world {
|
||||
include!(concat!(env!("OUT_DIR"), "/helloworld.rs"));
|
||||
tonic::include_proto!("helloworld");
|
||||
}
|
||||
|
||||
use hello_world::{
|
||||
|
||||
Reference in New Issue
Block a user