chore(release): Prepare 0.1.0-alpha.1 release (#24)

This commit is contained in:
Lucio Franco
2019-10-01 22:13:52 -04:00
committed by GitHub
parent 8f80d0f6d1
commit a282b6682d
7 changed files with 89 additions and 7 deletions
+44
View File
@@ -0,0 +1,44 @@
# tonic-build
Compiles proto files via prost and generates service stubs and proto definitiones for use with tonic.
## Features
- rustfmt: This feature enables the use of rustfmt to format the output code this makes the code readable and the error messages nice. This requires that rustfmt is installed. This is enabled by default.
Required dependencies
```toml
[dependencies]
bytes = <bytes-version>
tonic = <tonic-version>
prost = <prost-version>
[build-dependencies]
tonic-build = <tonic-version>
```
## Examples
### Simple
```rust
fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::compile_protos("proto/service.proto")?;
Ok(())
}
```
### Configuration
```rust
fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure()
.build_server(false)
.compile(
&["proto/helloworld/helloworld.proto"],
&["proto/helloworld"],
)?;
Ok(())
}
```