You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tonic-build/README.md
+34-6
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,15 @@
2
2
3
3
Compiles proto files via prost and generates service stubs and proto definitions for use with tonic.
4
4
5
+
# Feature flags
6
+
7
+
-`cleanup-markdown`: Enables cleaning up documentation from the generated code. Useful
8
+
when documentation of the generated code fails `cargo test --doc` for example. The
9
+
`prost` feature must be enabled to use this feature.
10
+
-`prost`: Enables usage of prost generator (enabled by default).
11
+
-`transport`: Enables generation of `connect` method using `tonic::transport::Channel`
12
+
(enabled by default).
13
+
5
14
## Features
6
15
7
16
Required dependencies
@@ -15,19 +24,20 @@ prost = "<prost-version>"
15
24
tonic-build = "<tonic-version>"
16
25
```
17
26
18
-
## Examples
27
+
## Getting Started
28
+
29
+
`tonic-build` works by being included as a [`build.rs` file](https://doc.rust-lang.org/cargo/reference/build-scripts.html) at the root of the binary/library.
See [more examples here](https://github.com/hyperium/tonic/tree/master/examples)
53
+
54
+
For further details how to use the generated client/server, see the [examples here](https://github.com/hyperium/tonic/tree/master/examples) or the Google APIs example below.
55
+
56
+
57
+
## NixOS related hints
58
+
59
+
On NixOS, it is better to specify the location of `PROTOC` and `PROTOC_INCLUDE` explicitly.
0 commit comments