Skip to content

Commit 1ad080c

Browse files
author
Hui Zhu
authored
Merge pull request #44 from Tim-Zhang/docs-and-publish
Docs and publish
2 parents aec729c + fa20590 commit 1ad080c

File tree

28 files changed

+302
-202
lines changed

28 files changed

+302
-202
lines changed

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ttrpc"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
authors = ["The AntFin Kata Team <[email protected]>"]
55
edition = "2018"
66
license = "Apache-2.0"
@@ -32,3 +32,6 @@ protobuf-codec = ["protobuf"]
3232
async = ["async-trait", "tokio", "futures", "tokio-vsock"]
3333
sync = []
3434

35+
[package.metadata.docs.rs]
36+
all-features = true
37+
rustdoc-args = ["--cfg", "docsrs"]

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ To generate the sources from proto files:
1313

1414
1. Install protoc from github.com/protocolbuffers/protobuf
1515

16-
2. Install protobuf-codegen from github.com/pingcap/grpc-rs
16+
2. Install protobuf-codegen
1717
```
18-
cd grpc-rs
1918
cargo install --force protobuf-codegen
2019
```
2120

@@ -57,10 +56,10 @@ ttrpc-rust supports async/.await. By using async/.await you can reduce the overh
5756

5857
## Usage
5958
### 1. Generate codes in async version
60-
Currently we only support generating async codes by using protoc_rust_ttrpc
59+
Currently we only support generating async codes by using ttrpc-codegen
6160

6261
```
63-
protoc_rust_ttrpc::Codegen::new()
62+
ttrpc_codegen::Codegen::new()
6463
.out_dir("protocols/asynchronous")
6564
.inputs(&protos)
6665
.include("protocols/protos")

compiler/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ttrpc-compiler"
3-
version = "0.3.1"
3+
version = "0.3.2"
44
edition = "2018"
55
authors = ["The AntFin Kata Team <[email protected]>"]
66
license = "Apache-2.0"
@@ -9,6 +9,7 @@ description = "ttRPC compiler for ttrpc"
99
categories = ["network-programming"]
1010
repository = "https://github.com/containerd/ttrpc-rust/tree/master/compiler"
1111
homepage = "https://github.com/containerd/ttrpc-rust/tree/master/compiler"
12+
readme = "README.md"
1213

1314
[dependencies]
1415
protobuf = "2.0"

compiler/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# A compiler of ttrpc-rust
22

3-
generate rust version ttrpc codes from proto files.
3+
generate rust version ttrpc code from proto files.
44

55
## Usage
66

compiler/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//!
1515
//! A compiler of ttrpc-rust.
1616
//!
17-
//! *generate rust version ttrpc codes from proto files.*
17+
//! *generate rust version ttrpc code from proto files.*
1818
//!
1919
//!
2020
//! Usage
@@ -27,9 +27,13 @@ pub mod codegen;
2727
pub mod prost_codegen;
2828
mod util;
2929

30+
/// Customize generated code.
3031
#[derive(Default, Debug, Clone)]
3132
pub struct Customize {
33+
/// Indicates whether to generate async code for both server and client.
3234
pub async_all: bool,
35+
/// Indicates whether to generate async code for client.
3336
pub async_client: bool,
37+
/// Indicates whether to generate async code for server.
3438
pub async_server: bool,
3539
}

0 commit comments

Comments
 (0)