fix(build): Fix service and rpc name conflict (#92)

Closes #89
This commit is contained in:
Lucio Franco
2019-10-23 15:01:04 -04:00
committed by GitHub
parent 50424a66ef
commit 1dbde95d84
11 changed files with 63 additions and 16 deletions
+16
View File
@@ -0,0 +1,16 @@
[package]
name = "same_name"
version = "0.1.0"
authors = ["Lucio Franco <[email protected]>"]
edition = "2018"
publish = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
tonic = { path = "../../tonic" }
bytes = "0.4"
prost = "0.5"
[build-dependencies]
tonic-build = { path = "../../tonic-build" }
+3
View File
@@ -0,0 +1,3 @@
fn main() {
tonic_build::compile_protos("proto/foo.proto").unwrap();
}
+11
View File
@@ -0,0 +1,11 @@
syntax = "proto3";
package foo;
service Foo {
rpc Foo(stream FooRequest) returns (stream FooResponse) {}
}
message FooRequest {}
message FooResponse {}
+3
View File
@@ -0,0 +1,3 @@
pub mod pb {
tonic::include_proto!("foo");
}