Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hyperium/tonic
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.8.0
Choose a base ref
...
head repository: hyperium/tonic
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.8.2
Choose a head ref
  • 15 commits
  • 32 files changed
  • 13 contributors

Commits on Aug 2, 2022

  1. chore: Update docs to reflect changes to compression feature (#1046)

    Co-authored-by: Lucio Franco <luciofranco14@gmail.com>
    Nick Ashley and LucioFranco authored Aug 2, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9be4e24 View commit details

Commits on Aug 9, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fb84058 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    433c4eb View commit details

Commits on Aug 15, 2022

  1. Update helloworld-tutorial.md (#1057)

    grpcurl command have been run successfully with modifieded like above.
    bathtimefish authored Aug 15, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2d66a0a View commit details

Commits on Aug 23, 2022

  1. tonic-health: commit generated code (#1065)

    * tonic-health: commit generated code rather than generating at build time
    
    This saves users from needing protoc available on their path if they're not
    generating other tonic code at build time, either.
    
    The generated modules can be regenerated by enabling the `gen-proto`
    feature, which will trigger the relevant part of the build script.
    
    * Check generated code for tonic-health matches in CI
    
    * Use bootstrap test to generate/check validity of generated code
    
    As suggested by @LucioFranco in https://github.com/hyperium/tonic/pull/1065\#discussion_r951580189.
    This avoids the need for a feature which would show
    up in docs.rs, and achieves the same goals via CI.
    sd2k authored Aug 23, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0a2a2f3 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    523a550 View commit details

Commits on Aug 24, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2a83f8b View commit details

Commits on Sep 6, 2022

  1. feat(transport): Expose hyper's H2 adaptive window on server (#1071)

    Co-authored-by: Adam Chalmers <adamschalmers@gmail.com>
    adamchalmers and Adam Chalmers authored Sep 6, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    919d28b View commit details

Commits on Sep 7, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5723681 View commit details

Commits on Sep 12, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ee3d0df View commit details

Commits on Sep 21, 2022

  1. feat(types): Add gRPC Richer Error Model support (BadRequest) (#1068)

    * types: add tonic as dependency, add error_details.proto
    
    * types: add BadRequest support from flemosr/tonic-richer-error
    
    * types: adjust code following suggestions
    
    Adjustments following suggestions by @LucioFranco in #1068.
    
    Adjust style, remove unecessary prints, avoid glob imports, apply
    `non_exhaustive` to `ErrorDetails` and `ErrorDetail`, avoid pub
    fields in `ErrorDetails`, adjust
    `WithErrorDetails::with_error_details_vec` args, add
    `gen_details_bytes`.
    
    * types: add generated protobuf code
    
    As suggested by @LucioFranco in #1068 (comment).
    
    This avoids the need for consumers to have `protoc` in their path.
    Implemented following changes in #1065.
    
    * types: add custom metadata support
    
    This allows consumers to provide custom metadata when creating a
    `Status` with error details.
    
    * types: adjust code following suggestions
    
    Adjustments following suggestions by @LucioFranco in #1068.
    
    Move `error_details_vec` mod into `error_details` mod, adjust doc
    comments, rename `WithErrorDetails` trait to `StatusExt`.
    flemosr authored Sep 21, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3e40d81 View commit details

Commits on Sep 26, 2022

  1. feat: add Result<T> type alias for `std::result::Result<T, tonic::S…

    …tatus>` (#1085)
    
    * add `Result<T>` type alias for `std::result::Result<T, tonic::Status>`
    
    * Allow user to override the error type
    
    Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
    
    * add rustdoc for `tonic::Result`
    
    * cargo fmt
    
    Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
    stphnsmpsn and davidpdrsn authored Sep 26, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    56ff45d View commit details

Commits on Sep 28, 2022

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c1b08df View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cddd992 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a7e29c9 View commit details
31 changes: 29 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
# [v0.8.0](https://github.com/hyperium/tonic/compare/v0.7.2...v0.8.0) (2022-07-29)
# [0.8.2](https://github.com/hyperium/tonic/compare/v0.8.1...v0.8.2) (2022-09-28)


### Bug Fixes

* **transport:** Bump axum for CVE-2022-3212 ([#1088](https://github.com/hyperium/tonic/issues/1088)) ([cddd992](https://github.com/hyperium/tonic/commit/cddd99266682127a3fa0e5d601f56a6346369814))


### Features

* **tonic:** add `Result<T>` type alias for `std::result::Result<T, tonic::Status>` ([#1085](https://github.com/hyperium/tonic/issues/1085)) ([56ff45d](https://github.com/hyperium/tonic/commit/56ff45d9a36040c429753d0d118ad980fbfe3eb8))
* **build:** add `cleanup-markdown` feature flag ([#1086](https://github.com/hyperium/tonic/issues/1086)) ([c1b08df](https://github.com/hyperium/tonic/commit/c1b08dffacb67e13ce7e94a002eee8999ca7c0e5))
* **tonic:** impl `Clone` for `Status` using `Arc` ([#1076](https://github.com/hyperium/tonic/issues/1076)) ([ee3d0df](https://github.com/hyperium/tonic/commit/ee3d0dfe7556fc7e996764f650ee3351097e7309))
* **transport:** Expose hyper's H2 adaptive window on server ([#1071](https://github.com/hyperium/tonic/issues/1071)) ([919d28b](https://github.com/hyperium/tonic/commit/919d28b2b96c7c803cec131a9e36e80d2b071701))


# [0.8.1](https://github.com/hyperium/tonic/compare/v0.8.0...v0.8.1) (2022-09-07)


### Features

* **transport:** Expose hyper's H2 adaptive window on server ([#1071](https://github.com/hyperium/tonic/issues/1071)) ([919d28b](https://github.com/hyperium/tonic/commit/919d28b2b96c7c803cec131a9e36e80d2b071701))
* Reduce the amount of monomorphized code.
* Expose `Extensions::into_http` and `Status::from_error`.
* **health:** Remove `build.rs` and commit generated code.

# [0.8.0](https://github.com/hyperium/tonic/compare/v0.7.2...v0.8.0) (2022-07-29)


### Features
@@ -14,8 +40,9 @@

* **build:** `CODEC_PATH` moved from const to fn
* **tonic** Remove codegen depedency on `compression` feature.
* **tonic** Remove `compression` feature in favor of `gzip` feature.

# [v0.7.2](https://github.com/hyperium/tonic/compare/v0.7.1...v0.7.2) (2022-05-04)
# [0.7.2](https://github.com/hyperium/tonic/compare/v0.7.1...v0.7.2) (2022-05-04)


### Bug Fixes
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -52,6 +52,31 @@ $ rustup update
$ cargo build
```

### Dependencies

In order to build `tonic` >= 0.8.0, you need the `protoc` Protocol Buffers compiler, along with Protocol Buffers resource files.

#### Ubuntu

```bash
sudo apt update && sudo apt upgrade -y
sudo apt install -y protobuf-compiler libprotobuf-dev
```

#### Alpine Linux

```sh
sudo apk add protoc protobuf-dev
```

#### macOS

Assuming [Homebrew](https://brew.sh/) is already installed. (If not, see instructions for installing Homebrew on [the Homebrew website](https://brew.sh/).)

```zsh
brew install protobuf
```

### Tutorials

- The [`helloworld`][helloworld-tutorial] tutorial provides a basic example of using `tonic`, perfect for first time users!
24 changes: 24 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,30 @@

Set of examples that show off the features provided by `tonic`.

In order to build these examples, you must have the `protoc` Protocol Buffers compiler
installed, along with the Protocol Buffers resource files.

Ubuntu:

```bash
sudo apt update && sudo apt upgrade -y
sudo apt install -y protobuf-compiler libprotobuf-dev
```

Alpine Linux:

```sh
sudo apk add protoc protobuf-dev
```

macOS:

Assuming [Homebrew](https://brew.sh/) is already installed. (If not, see instructions for installing Homebrew on [the Homebrew website](https://brew.sh/).)

```zsh
brew install protobuf
```

## Helloworld

### Client
2 changes: 1 addition & 1 deletion examples/helloworld-tutorial.md
Original file line number Diff line number Diff line change
@@ -243,7 +243,7 @@ If you have a gRPC GUI client such as [Bloom RPC] you should be able to send req

Or if you use [grpcurl] then you can simply try send requests like this:
```
$ grpcurl -plaintext -import-path ./proto -proto helloworld.proto -d '{"name": "Tonic"}' [::]:50051 helloworld.Greeter/SayHello
$ grpcurl -plaintext -import-path ./proto -proto helloworld.proto -d '{"name": "Tonic"}' '[::]:50051' helloworld.Greeter/SayHello
```
And receiving responses like this:
```
9 changes: 5 additions & 4 deletions tonic-build/Cargo.toml
Original file line number Diff line number Diff line change
@@ -4,25 +4,26 @@ categories = ["network-programming", "asynchronous"]
description = """
Codegen module of `tonic` gRPC implementation.
"""
documentation = "https://docs.rs/tonic-build/0.7.2/tonic_build/"
documentation = "https://docs.rs/tonic-build/0.8.2/tonic_build/"
edition = "2018"
homepage = "https://github.com/hyperium/tonic"
keywords = ["rpc", "grpc", "async", "codegen", "protobuf"]
license = "MIT"
name = "tonic-build"
readme = "README.md"
repository = "https://github.com/hyperium/tonic"
version = "0.8.0"
version = "0.8.2"

[dependencies]
prettyplease = {version = "0.1"}
prettyplease = { version = "0.1" }
proc-macro2 = "1.0"
prost-build = {version = "0.11", optional = true}
prost-build = { version = "0.11", optional = true }
quote = "1.0"
syn = "1.0"

[features]
default = ["transport", "prost"]
cleanup-markdown = ["prost-build/cleanup-markdown"]
prost = ["prost-build"]
transport = []

10 changes: 9 additions & 1 deletion tonic-build/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
//! `tonic-build` compiles `proto` files via `prost` and generates service stubs
//! and proto definitiones for use with `tonic`.
//!
//! # Feature flags
//!
//! - `cleanup-markdown`: Enables cleaning up documentation from the generated code. Useful
//! when documentation of the generated code fails `cargo test --doc` for example.
//! - `prost`: Enables usage of prost generator (enabled by default).
//! - `transport`: Enables generation of `connect` method using `tonic::transport::Channel`
//! (enabled by default).
//!
//! # Required dependencies
//!
//! ```toml
@@ -62,7 +70,7 @@
html_logo_url = "https://raw.githubusercontent.com/tokio-rs/website/master/public/img/icons/tonic.svg"
)]
#![deny(rustdoc::broken_intra_doc_links)]
#![doc(html_root_url = "https://docs.rs/tonic-build/0.8.0")]
#![doc(html_root_url = "https://docs.rs/tonic-build/0.8.2")]
#![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")]
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
#![cfg_attr(docsrs, feature(doc_cfg))]
6 changes: 2 additions & 4 deletions tonic-health/Cargo.toml
Original file line number Diff line number Diff line change
@@ -12,11 +12,11 @@ license = "MIT"
name = "tonic-health"
readme = "README.md"
repository = "https://github.com/hyperium/tonic"
version = "0.7.0"
version = "0.7.1"

[features]
default = ["transport"]
transport = ["tonic/transport", "tonic-build/transport"]
transport = ["tonic/transport"]

[dependencies]
async-stream = "0.3"
@@ -28,6 +28,4 @@ tonic = {version = "0.8", path = "../tonic", features = ["codegen", "prost"]}

[dev-dependencies]
tokio = {version = "1.0", features = ["rt-multi-thread", "macros"]}

[build-dependencies]
tonic-build = {version = "0.8", path = "../tonic-build", features = ["prost"]}
14 changes: 0 additions & 14 deletions tonic-health/build.rs

This file was deleted.

Loading