diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0e76f3df..e1faa0bfa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,4 +104,16 @@ jobs: - run: go version ; cargo version ; cmake --version - run: scripts/reset-submodule.cmd - run: cargo build - - run: cargo test --all \ No newline at end of file + - run: cargo test --all + + Pre-Release: + name: Pre-Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: scripts/reset-submodule.cmd + - run: cd grpc-sys && cargo publish --dry-run + - name: Check generated package size + run: | + ls -alh target/package/grpcio-sys-*.crate + test `cat target/package/grpcio-sys-*.crate | wc -c` -le 10485760 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4965a8161..d4c0b5293 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +# 0.6.0 - 2020-06-12 + +- Switch to std::future (#447) +- Update gRPC C core to 1.29.1 (#466) +- Change spinlock to parking_lot::Mutex (#468) + +# 0.5.3 - 2020-05-07 + +- Switch to github action and update badge (#459) +- Enable ALPN by default (#456) + # grpcio-sys 0.5.2 - 2020-03-31 - Downgrade bindgen version to be backward compatible. (#452) @@ -8,7 +19,7 @@ - Support unix domain socket (#446) - Build: fix rebuild rules for no prebuilt bindings (#450) -# 0.5.0 - 2019-03-16 +# 0.5.0 - 2020-03-16 - Make `build_args` and `channel_args` public (#405) - Reclaim buffer memory after sending message (#407) diff --git a/Cargo.toml b/Cargo.toml index a5d82b170..7775f3070 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grpcio" -version = "0.5.1" +version = "0.6.0" edition = "2018" authors = ["The TiKV Project Developers"] license = "Apache-2.0" @@ -17,7 +17,7 @@ autoexamples = false all-features = true [dependencies] -grpcio-sys = { path = "grpc-sys", version = "0.5.0" } +grpcio-sys = { path = "grpc-sys", version = "0.6.0" } libc = "0.2" futures = "0.3" protobuf = { version = "2.0", optional = true } @@ -45,4 +45,5 @@ debug = true travis-ci = { repository = "tikv/grpc-rs" } [patch.crates-io] -grpcio-compiler = { path = "compiler", version = "0.5.0", default-features = false } +grpcio-compiler = { path = "compiler", version = "0.6.0", default-features = false } +protobuf-build = { git = "https://github.com/tikv/protobuf-build.git" } diff --git a/README.md b/README.md index 7bb4e330a..03f4e19c4 100644 --- a/README.md +++ b/README.md @@ -26,14 +26,14 @@ This project is still under development. The following features with the check m ## Prerequisites - CMake >= 3.8.0 -- Rust >= 1.19.0 +- Rust >= 1.36.0 - binutils >= 2.22 - LLVM and Clang >= 3.9 if you need to generate bindings at compile time. -- By default, the [secure feature](#feature-secure) is provided by boringssl, which requires Go (>=1.7) to build. You can also use openssl instead by enabling [openssl feature](#feature-openssl). +- By default, the [secure feature](#feature-secure) is provided by boringssl. You can also use openssl instead by enabling [openssl feature](#feature-openssl). For Linux and MacOS, you also need to install gcc (or clang) too. -Bindings are pre-generated for x86_64 Linux. For other platforms, bindings are generated at compile time. +Bindings are pre-generated for x86_64/arm64 Linux. For other platforms, bindings are generated at compile time. For Windows, you also need to install following software: @@ -90,7 +90,7 @@ To include this project as a dependency: ``` [dependencies] -grpcio = "0.4" +grpcio = "0.6" ``` ### Feature `secure` @@ -100,10 +100,17 @@ mechanism. When you do not need it, for example when working in intranet, you can disable it by using the following configuration: ``` [dependencies] -grpcio = { version = "0.4", default-features = false, features = ["protobuf-codec"] } +grpcio = { version = "0.6", default-features = false, features = ["protobuf-codec"] } ``` -### Feature `openssl` +### Feature `prost-codec` and `protobuf-codec` + +`gRPC-rs` uses `protobuf` crate by default. If you want to use `prost` instead, you can enable +`prost-codec` feature. You probably only want to enable only one of the two features. Though +grpcio is completely fine with both features enabled at the same time, grpcio-compiler +will not going to work as expected. + +### Feature `openssl` and `openssl-vendored` `gRPC-rs` comes vendored with `gRPC Core`, which by default uses BoringSSL instead of OpenSSL. This may cause linking issues due to symbol clashes and/or @@ -113,9 +120,12 @@ your `Cargo.toml`'s features list for `gprcio`, which requires openssl (>=1.0.2) ```toml [dependencies] -grpcio = { version = "0.4.4", features = ["openssl"] } +grpcio = { version = "0.6", features = ["openssl"] } ``` +Feature `openssl-vendored` is the same as feature `openssl` except it will build openssl from +bundled sources. + ## Performance See [benchmark](https://github.com/tikv/grpc-rs/tree/master/benchmark) to find out how to run a benchmark by yourself. diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml index 6ddea7dc4..07731e011 100644 --- a/compiler/Cargo.toml +++ b/compiler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grpcio-compiler" -version = "0.5.0" +version = "0.6.0" edition = "2018" authors = ["The TiKV Project Developers"] license = "Apache-2.0" diff --git a/grpc-sys/Cargo.toml b/grpc-sys/Cargo.toml index 9f18193a6..fcd38d68a 100644 --- a/grpc-sys/Cargo.toml +++ b/grpc-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grpcio-sys" -version = "0.5.2" +version = "0.6.0" authors = ["The TiKV Project Developers"] license = "Apache-2.0" keywords = ["grpc", "bindings"] @@ -26,8 +26,14 @@ exclude = [ "grpc/src/ruby/*", "grpc/test/core/end2end/*", "grpc/third_party/zlib/*", + "grpc/third_party/abseil-cpp/absl/time/internal/cctz/testdata", "grpc/third_party/benchmark/*", "grpc/third_party/bloaty/*", + "grpc/third_party/boringssl-with-bazel/crypto_test_data.cc", + "grpc/third_party/boringssl-with-bazel/src/fuzz", + "grpc/third_party/boringssl-with-bazel/src/crypto/cipher_extra/test", + "grpc/third_party/boringssl-with-bazel/src/third_party/wycheproof_testvectors", + "grpc/third_party/boringssl-with-bazel/src/third_party/googletest", "grpc/third_party/libuv/*", "grpc/third_party/gflags/*", "grpc/third_party/googletest/*", diff --git a/proto/Cargo.toml b/proto/Cargo.toml index 07168c79a..d845452e7 100644 --- a/proto/Cargo.toml +++ b/proto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grpcio-proto" -version = "0.5.0" +version = "0.6.0" edition = "2018" authors = ["The TiKV Project Developers"] license = "Apache-2.0" @@ -19,7 +19,7 @@ prost-codec = ["prost-derive", "bytes", "lazy_static", "grpcio/prost-codec", "pr [dependencies] futures = "0.3" -grpcio = { path = "..", features = ["secure"], version = "0.5.0", default-features = false } +grpcio = { path = "..", features = ["secure"], version = "0.6.0", default-features = false } bytes = { version = "0.5", optional = true } prost = { version = "0.6", optional = true } prost-derive = { version = "0.6", optional = true } diff --git a/tests-and-examples/Cargo.toml b/tests-and-examples/Cargo.toml index dd2b65a00..2df551e90 100644 --- a/tests-and-examples/Cargo.toml +++ b/tests-and-examples/Cargo.toml @@ -3,6 +3,7 @@ name = "tests-and-examples" version = "0.1.0" edition = "2018" autoexamples = false +publish = false [features] default = ["protobuf-codec"] @@ -10,20 +11,20 @@ protobuf-codec = ["protobuf", "grpcio/protobuf-codec", "grpcio-proto/protobuf-co prost-codec = ["prost", "bytes", "grpcio/prost-codec", "grpcio-proto/prost-codec"] [dependencies] -grpcio-sys = { path = "../grpc-sys", version = "0.5.0" } +grpcio-sys = { path = "../grpc-sys", version = "0.6.0" } libc = "0.2" futures = "0.3" protobuf = { version = "2.0", optional = true } prost = { version = "0.6", optional = true } bytes = { version = "0.5", optional = true } log = "0.4" -grpcio = { path = "..", version = "0.5.0", default-features = false, features = ["secure"] } +grpcio = { path = "..", version = "0.6.0", default-features = false, features = ["secure"] } [dev-dependencies] serde_json = "1.0" serde = "1.0" serde_derive = "1.0" -grpcio-proto = { path = "../proto", version = "0.5.0", default-features = false } +grpcio-proto = { path = "../proto", version = "0.6.0", default-features = false } rand = "0.7" slog = "2.0" slog-async = "2.1"