From 1f3df8db9e4a30062d6e947e56723c639530b366 Mon Sep 17 00:00:00 2001 From: Lucio Franco Date: Sun, 24 Oct 2021 21:12:20 -0400 Subject: [PATCH] chore: Upgrade to 2021 edition (#808) --- examples/Cargo.toml | 38 ++++---- examples/helloworld-tutorial.md | 2 +- interop/Cargo.toml | 28 +++--- rustfmt.toml | 2 +- tests/ambiguous_methods/Cargo.toml | 12 +-- tests/compression/Cargo.toml | 28 +++--- tests/extern_path/my_application/Cargo.toml | 14 +-- tests/extern_path/uuid/Cargo.toml | 10 +-- tests/included_service/Cargo.toml | 12 +-- tests/integration_tests/Cargo.toml | 28 +++--- tests/root-crate-path/Cargo.toml | 12 +-- tests/same_name/Cargo.toml | 12 +-- tests/service_named_service/Cargo.toml | 12 +-- tests/stream_conflict/Cargo.toml | 10 +-- tests/wellknown-compiled/Cargo.toml | 12 +-- tests/wellknown/Cargo.toml | 12 +-- tonic-build/Cargo.toml | 31 ++++--- tonic-health/Cargo.toml | 30 +++---- tonic-reflection/Cargo.toml | 26 +++--- tonic-types/Cargo.toml | 18 ++-- tonic-web/Cargo.toml | 32 +++---- tonic-web/tests/integration/Cargo.toml | 18 ++-- tonic/Cargo.toml | 96 ++++++++++----------- 23 files changed, 247 insertions(+), 248 deletions(-) diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 26a78bd13..077bae44f 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "examples" -version = "0.1.0" authors = ["Lucio Franco "] -edition = "2018" -publish = false +edition = "2021" license = "MIT" +name = "examples" +publish = false +version = "0.1.0" [[bin]] name = "helloworld-server" @@ -179,38 +179,38 @@ name = "streaming-server" path = "src/streaming/server.rs" [dependencies] -tonic = { path = "../tonic", features = ["tls", "compression"] } -prost = "0.9" -tokio = { version = "1.0", features = ["rt-multi-thread", "time", "fs", "macros", "net"] } -tokio-stream = { version = "0.1", features = ["net"] } async-stream = "0.3" -futures = { version = "0.3", default-features = false, features = ["alloc"] } -tower = { version = "0.4" } +futures = {version = "0.3", default-features = false, features = ["alloc"]} +prost = "0.9" +tokio = {version = "1.0", features = ["rt-multi-thread", "time", "fs", "macros", "net"]} +tokio-stream = {version = "0.1", features = ["net"]} +tonic = {path = "../tonic", features = ["tls", "compression"]} +tower = {version = "0.4"} # Required for routeguide -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" rand = "0.8" +serde = {version = "1.0", features = ["derive"]} +serde_json = "1.0" # Tracing tracing = "0.1.16" -tracing-subscriber = { version = "0.2", features = ["tracing-log"] } tracing-attributes = "0.1" tracing-futures = "0.2" +tracing-subscriber = {version = "0.2", features = ["tracing-log"]} # Required for wellknown types prost-types = "0.9" # Hyper example -hyper = { version = "0.14", features = ["full"] } -warp = "0.3" http = "0.2" http-body = "0.4.2" +hyper = {version = "0.14", features = ["full"]} pin-project = "1.0" +warp = "0.3" # Health example -tonic-health = { path = "../tonic-health" } +tonic-health = {path = "../tonic-health"} # Reflection example -tonic-reflection = { path = "../tonic-reflection" } listenfd = "0.3" +tonic-reflection = {path = "../tonic-reflection"} # grpc-web example -tonic-web = { path = "../tonic-web" } bytes = "1" +tonic-web = {path = "../tonic-web"} [build-dependencies] -tonic-build = { path = "../tonic-build", features = ["prost", "compression"] } +tonic-build = {path = "../tonic-build", features = ["prost", "compression"]} diff --git a/examples/helloworld-tutorial.md b/examples/helloworld-tutorial.md index 001407a84..4cb48126c 100644 --- a/examples/helloworld-tutorial.md +++ b/examples/helloworld-tutorial.md @@ -102,7 +102,7 @@ Now that have defined the protobuf for our application we can start writing our [package] name = "helloworld-tonic" version = "0.1.0" -edition = "2018" +edition = "2021" [[bin]] # Bin to run the HelloWorld gRPC server name = "helloworld-server" diff --git a/interop/Cargo.toml b/interop/Cargo.toml index 2aed933f5..856378fa4 100644 --- a/interop/Cargo.toml +++ b/interop/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "interop" -version = "0.1.0" authors = ["Lucio Franco "] -edition = "2018" -publish = false +edition = "2021" license = "MIT" +name = "interop" +publish = false +version = "0.1.0" [[bin]] name = "client" @@ -15,24 +15,24 @@ name = "server" path = "src/bin/server.rs" [dependencies] -tokio = { version = "1.0", features = ["rt-multi-thread", "time", "macros", "fs"] } -tokio-stream = "0.1" async-stream = "0.3" -tonic = { path = "../tonic", features = ["tls"] } -prost = "0.9" -prost-derive = "0.9" bytes = "1.0" -http = "0.2" +console = "0.14" futures-core = "0.3" futures-util = "0.3" -tower = { version = "0.4" } +http = "0.2" http-body = "0.4.2" hyper = "0.14" -console = "0.14" +prost = "0.9" +prost-derive = "0.9" structopt = "0.3" +tokio = {version = "1.0", features = ["rt-multi-thread", "time", "macros", "fs"]} +tokio-stream = "0.1" +tonic = {path = "../tonic", features = ["tls"]} +tower = {version = "0.4"} tracing = "0.1" -tracing-subscriber = "0.2" tracing-log = "0.1" +tracing-subscriber = "0.2" [build-dependencies] -tonic-build = { path = "../tonic-build", features = ["prost"] } +tonic-build = {path = "../tonic-build", features = ["prost"]} diff --git a/rustfmt.toml b/rustfmt.toml index 32a9786fa..3a26366d4 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1 +1 @@ -edition = "2018" +edition = "2021" diff --git a/tests/ambiguous_methods/Cargo.toml b/tests/ambiguous_methods/Cargo.toml index e0956a277..263db18ab 100644 --- a/tests/ambiguous_methods/Cargo.toml +++ b/tests/ambiguous_methods/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "ambiguous_methods" -version = "0.1.0" authors = ["Yonathan Randolph "] -edition = "2018" -publish = false +edition = "2021" license = "MIT" +name = "ambiguous_methods" +publish = false +version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tonic = { path= "../../tonic" } prost = "0.9" +tonic = {path = "../../tonic"} [build-dependencies] -tonic-build = { path= "../../tonic-build" } +tonic-build = {path = "../../tonic-build"} diff --git a/tests/compression/Cargo.toml b/tests/compression/Cargo.toml index cf0870325..bff48e2e6 100644 --- a/tests/compression/Cargo.toml +++ b/tests/compression/Cargo.toml @@ -1,24 +1,24 @@ [package] -name = "compression" -version = "0.1.0" authors = ["Lucio Franco "] -edition = "2018" -publish = false +edition = "2021" license = "MIT" +name = "compression" +publish = false +version = "0.1.0" [dependencies] -tonic = { path = "../../tonic", features = ["compression"] } -prost = "0.9" -tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "net"] } -tower = { version = "0.4", features = [] } -http-body = "0.4" -http = "0.2" -tokio-stream = { version = "0.1.5", features = ["net"] } -tower-http = { version = "0.1", features = ["map-response-body", "map-request-body"] } bytes = "1" futures = "0.3" -pin-project = "1.0" +http = "0.2" +http-body = "0.4" hyper = "0.14.3" +pin-project = "1.0" +prost = "0.9" +tokio = {version = "1.0", features = ["macros", "rt-multi-thread", "net"]} +tokio-stream = {version = "0.1.5", features = ["net"]} +tonic = {path = "../../tonic", features = ["compression"]} +tower = {version = "0.4", features = []} +tower-http = {version = "0.1", features = ["map-response-body", "map-request-body"]} [build-dependencies] -tonic-build = { path = "../../tonic-build", features = ["compression"] } +tonic-build = {path = "../../tonic-build", features = ["compression"]} diff --git a/tests/extern_path/my_application/Cargo.toml b/tests/extern_path/my_application/Cargo.toml index 8a1e406ad..359d1f939 100644 --- a/tests/extern_path/my_application/Cargo.toml +++ b/tests/extern_path/my_application/Cargo.toml @@ -1,18 +1,18 @@ [package] -name = "my_application" -version = "0.1.0" authors = ["Danny Hua "] -edition = "2018" -publish = false +edition = "2021" license = "MIT" +name = "my_application" +publish = false +version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tonic = { path= "../../../tonic" } prost = "0.9" prost-types = "0.9" -uuid = { package = "uuid1", path= "../uuid" } +tonic = {path = "../../../tonic"} +uuid = {package = "uuid1", path = "../uuid"} [build-dependencies] -tonic-build = { path= "../../../tonic-build" } +tonic-build = {path = "../../../tonic-build"} diff --git a/tests/extern_path/uuid/Cargo.toml b/tests/extern_path/uuid/Cargo.toml index 6515ca371..089f48788 100644 --- a/tests/extern_path/uuid/Cargo.toml +++ b/tests/extern_path/uuid/Cargo.toml @@ -1,15 +1,15 @@ [package] -name = "uuid1" -version = "0.1.0" authors = ["Danny Hua "] -edition = "2018" -publish = false +edition = "2021" license = "MIT" +name = "uuid1" +publish = false +version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -prost = "0.9" bytes = "1.0" +prost = "0.9" [build-dependencies] prost-build = "0.9" diff --git a/tests/included_service/Cargo.toml b/tests/included_service/Cargo.toml index 53dd38f4b..935d39d6f 100644 --- a/tests/included_service/Cargo.toml +++ b/tests/included_service/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "included_service" -version = "0.1.0" authors = ["Lucio Franco "] -edition = "2018" -publish = false +edition = "2021" license = "MIT" +name = "included_service" +publish = false +version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tonic = { path = "../../tonic" } prost = "0.9" +tonic = {path = "../../tonic"} [build-dependencies] -tonic-build = { path = "../../tonic-build" } +tonic-build = {path = "../../tonic-build"} diff --git a/tests/integration_tests/Cargo.toml b/tests/integration_tests/Cargo.toml index 9d14221a5..71bbaca94 100644 --- a/tests/integration_tests/Cargo.toml +++ b/tests/integration_tests/Cargo.toml @@ -1,29 +1,29 @@ [package] -name = "integration-tests" -version = "0.1.0" authors = ["Lucio Franco "] -edition = "2018" -publish = false +edition = "2021" license = "MIT" +name = "integration-tests" +publish = false +version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tonic = { path = "../../tonic" } -prost = "0.9" -futures-util = "0.3" bytes = "1.0" +futures-util = "0.3" +prost = "0.9" +tonic = {path = "../../tonic"} [dev-dependencies] -tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "net"] } -tokio-stream = { version = "0.1.5", features = ["net"] } -tower-service = "0.3" -hyper = "0.14" futures = "0.3" -tower = { version = "0.4", features = [] } -http-body = "0.4" http = "0.2" +http-body = "0.4" +hyper = "0.14" +tokio = {version = "1.0", features = ["macros", "rt-multi-thread", "net"]} +tokio-stream = {version = "0.1.5", features = ["net"]} +tower = {version = "0.4", features = []} +tower-service = "0.3" tracing-subscriber = "0.2" [build-dependencies] -tonic-build = { path = "../../tonic-build" } +tonic-build = {path = "../../tonic-build"} diff --git a/tests/root-crate-path/Cargo.toml b/tests/root-crate-path/Cargo.toml index f57c2a010..ae95e71f7 100644 --- a/tests/root-crate-path/Cargo.toml +++ b/tests/root-crate-path/Cargo.toml @@ -1,14 +1,14 @@ [package] -name = "root-crate-path" -version = "0.1.0" authors = ["Lucio Franco "] -edition = "2018" -publish = false +edition = "2021" license = "MIT" +name = "root-crate-path" +publish = false +version = "0.1.0" [dependencies] -tonic = { path = "../../tonic" } prost = "0.9" +tonic = {path = "../../tonic"} [build_dependencies] -tonic-build = { path = "../../tonic-build" } +tonic-build = {path = "../../tonic-build"} diff --git a/tests/same_name/Cargo.toml b/tests/same_name/Cargo.toml index c34d2460f..7bb2a2aea 100644 --- a/tests/same_name/Cargo.toml +++ b/tests/same_name/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "same_name" -version = "0.1.0" authors = ["Lucio Franco "] -edition = "2018" -publish = false +edition = "2021" license = "MIT" +name = "same_name" +publish = false +version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tonic = { path = "../../tonic" } prost = "0.9" +tonic = {path = "../../tonic"} [build-dependencies] -tonic-build = { path = "../../tonic-build" } +tonic-build = {path = "../../tonic-build"} diff --git a/tests/service_named_service/Cargo.toml b/tests/service_named_service/Cargo.toml index cf03c1a96..fdc574429 100644 --- a/tests/service_named_service/Cargo.toml +++ b/tests/service_named_service/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "service_named_service" -version = "0.1.0" authors = ["Lucio Franco "] -edition = "2018" -publish = false +edition = "2021" license = "MIT" +name = "service_named_service" +publish = false +version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tonic = { path = "../../tonic" } prost = "0.9" +tonic = {path = "../../tonic"} [build-dependencies] -tonic-build = { path = "../../tonic-build" } +tonic-build = {path = "../../tonic-build"} diff --git a/tests/stream_conflict/Cargo.toml b/tests/stream_conflict/Cargo.toml index b4f0e9232..9b8f8d027 100644 --- a/tests/stream_conflict/Cargo.toml +++ b/tests/stream_conflict/Cargo.toml @@ -1,15 +1,15 @@ [package] -name = "stream_conflict" -version = "0.1.0" authors = ["Ben Sully "] +edition = "2021" +name = "stream_conflict" publish = false -edition = "2018" +version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tonic = { path = "../../tonic" } prost = "0.9" +tonic = {path = "../../tonic"} [build-dependencies] -tonic-build = { path = "../../tonic-build" } +tonic-build = {path = "../../tonic-build"} diff --git a/tests/wellknown-compiled/Cargo.toml b/tests/wellknown-compiled/Cargo.toml index 075369ba3..1d442e627 100644 --- a/tests/wellknown-compiled/Cargo.toml +++ b/tests/wellknown-compiled/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "wellknown-compiled" -version = "0.1.0" authors = ["Lucio Franco "] -edition = "2018" -publish = false +edition = "2021" license = "MIT" +name = "wellknown-compiled" +publish = false +version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -12,9 +12,9 @@ license = "MIT" doctest = false [dependencies] -tonic = { path = "../../tonic" } prost = "0.9" +tonic = {path = "../../tonic"} [build-dependencies] prost-build = "0.9" -tonic-build = { path = "../../tonic-build" } +tonic-build = {path = "../../tonic-build"} diff --git a/tests/wellknown/Cargo.toml b/tests/wellknown/Cargo.toml index 300d2e7c4..b380f43f9 100644 --- a/tests/wellknown/Cargo.toml +++ b/tests/wellknown/Cargo.toml @@ -1,17 +1,17 @@ [package] -name = "wellknown" -version = "0.1.0" authors = ["Lucio Franco "] -edition = "2018" -publish = false +edition = "2021" license = "MIT" +name = "wellknown" +publish = false +version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tonic = { path = "../../tonic" } prost = "0.9" prost-types = "0.9" +tonic = {path = "../../tonic"} [build-dependencies] -tonic-build = { path = "../../tonic-build" } +tonic-build = {path = "../../tonic-build"} diff --git a/tonic-build/Cargo.toml b/tonic-build/Cargo.toml index 433c4b6d5..4a699e595 100644 --- a/tonic-build/Cargo.toml +++ b/tonic-build/Cargo.toml @@ -1,32 +1,31 @@ [package] -name = "tonic-build" -version = "0.6.0" authors = ["Lucio Franco "] -edition = "2018" -license = "MIT" -documentation = "https://docs.rs/tonic-build/0.6.0/tonic_build/" -repository = "https://github.com/hyperium/tonic" -homepage = "https://github.com/hyperium/tonic" +categories = ["network-programming", "asynchronous"] description = """ Codegen module of `tonic` gRPC implementation. """ -readme = "README.md" -categories = ["network-programming", "asynchronous"] +documentation = "https://docs.rs/tonic-build/0.6.0/tonic_build/" +edition = "2021" +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.6.0" [dependencies] -prost-build = { version = "0.9", optional = true } -syn = "1.0" -quote = "1.0" proc-macro2 = "1.0" +prost-build = {version = "0.9", optional = true} +quote = "1.0" +syn = "1.0" [features] +compression = [] default = ["transport", "rustfmt", "prost"] +prost = ["prost-build"] rustfmt = [] transport = [] -prost = ["prost-build"] -compression = [] [package.metadata.docs.rs] -all-features = true \ No newline at end of file +all-features = true diff --git a/tonic-health/Cargo.toml b/tonic-health/Cargo.toml index 1b5a8ecae..3fcf8016f 100644 --- a/tonic-health/Cargo.toml +++ b/tonic-health/Cargo.toml @@ -1,34 +1,34 @@ [package] -name = "tonic-health" -version = "0.4.1" authors = ["James Nugent "] -edition = "2018" -license = "MIT" -repository = "https://github.com/hyperium/tonic" -homepage = "https://github.com/hyperium/tonic" -documentation = "https://docs.rs/tonic-health/0.4.0/tonic-health/" +categories = ["network-programming", "asynchronous"] description = """ Health Checking module of `tonic` gRPC implementation. """ -readme = "README.md" -categories = ["network-programming", "asynchronous"] +documentation = "https://docs.rs/tonic-health/0.4.0/tonic-health/" +edition = "2021" +homepage = "https://github.com/hyperium/tonic" keywords = ["rpc", "grpc", "async", "healthcheck"] +license = "MIT" +name = "tonic-health" +readme = "README.md" +repository = "https://github.com/hyperium/tonic" +version = "0.4.1" [features] default = ["transport", "rustfmt"] -transport = ["tonic/transport", "tonic-build/transport"] rustfmt = ["tonic-build/rustfmt"] +transport = ["tonic/transport", "tonic-build/transport"] [dependencies] -tokio = { version = "1.0", features = ["sync"] } -tonic = { version = "0.6", path = "../tonic", features = ["codegen", "prost"] } +async-stream = "0.3" bytes = "1.0" prost = "0.9" +tokio = {version = "1.0", features = ["sync"]} tokio-stream = "0.1" -async-stream = "0.3" +tonic = {version = "0.6", path = "../tonic", features = ["codegen", "prost"]} [dev-dependencies] -tokio = { version = "1.0", features = ["rt-multi-thread", "macros"]} +tokio = {version = "1.0", features = ["rt-multi-thread", "macros"]} [build-dependencies] -tonic-build = { version = "0.6", path = "../tonic-build", features = ["prost"] } +tonic-build = {version = "0.6", path = "../tonic-build", features = ["prost"]} diff --git a/tonic-reflection/Cargo.toml b/tonic-reflection/Cargo.toml index 3871919fa..27dceb543 100644 --- a/tonic-reflection/Cargo.toml +++ b/tonic-reflection/Cargo.toml @@ -1,20 +1,20 @@ [package] -name = "tonic-reflection" -version = "0.2.0" authors = [ "James Nugent ", - "Samani G. Gikandi " + "Samani G. Gikandi ", ] -edition = "2018" -license = "MIT" -repository = "https://github.com/hyperium/tonic" -homepage = "https://github.com/hyperium/tonic" +categories = ["network-programming", "asynchronous"] description = """ Server Reflection module of `tonic` gRPC implementation. """ -readme = "README.md" -categories = ["network-programming", "asynchronous"] +edition = "2021" +homepage = "https://github.com/hyperium/tonic" keywords = ["rpc", "grpc", "async", "reflection"] +license = "MIT" +name = "tonic-reflection" +readme = "README.md" +repository = "https://github.com/hyperium/tonic" +version = "0.2.0" [features] default = ["rustfmt"] @@ -24,12 +24,12 @@ rustfmt = ["tonic-build/rustfmt"] bytes = "1.0" prost = "0.9" prost-types = "0.9" -tokio = { version = "1.0", features = ["sync"] } -tokio-stream = { version = "0.1", features = ["net"] } -tonic = { version = "0.6", path = "../tonic", features = ["codegen", "prost"] } +tokio = {version = "1.0", features = ["sync"]} +tokio-stream = {version = "0.1", features = ["net"]} +tonic = {version = "0.6", path = "../tonic", features = ["codegen", "prost"]} [build-dependencies] -tonic-build = { version = "0.6", path = "../tonic-build", features = ["transport", "prost"] } +tonic-build = {version = "0.6", path = "../tonic-build", features = ["transport", "prost"]} [dev-dependencies] futures = "0.3" diff --git a/tonic-types/Cargo.toml b/tonic-types/Cargo.toml index 5adfeabab..4223a9b24 100644 --- a/tonic-types/Cargo.toml +++ b/tonic-types/Cargo.toml @@ -1,18 +1,18 @@ [package] -name = "tonic-types" -version = "0.4.0" authors = ["Lucio Franco "] -edition = "2018" -license = "MIT" -documentation = "https://docs.rs/tonic-types/0.4.0/tonic-types/" -repository = "https://github.com/hyperium/tonic" -homepage = "https://github.com/hyperium/tonic" +categories = ["web-programming", "network-programming", "asynchronous"] description = """ A collection of useful protobuf types that can be used with `tonic`. """ -readme = "../README.md" -categories = ["web-programming", "network-programming", "asynchronous"] +documentation = "https://docs.rs/tonic-types/0.4.0/tonic-types/" +edition = "2021" +homepage = "https://github.com/hyperium/tonic" keywords = ["rpc", "grpc", "protobuf"] +license = "MIT" +name = "tonic-types" +readme = "../README.md" +repository = "https://github.com/hyperium/tonic" +version = "0.4.0" [dependencies] prost = "0.9" diff --git a/tonic-web/Cargo.toml b/tonic-web/Cargo.toml index 845b7a56f..f899a0ffd 100644 --- a/tonic-web/Cargo.toml +++ b/tonic-web/Cargo.toml @@ -1,31 +1,31 @@ [package] -name = "tonic-web" -version = "0.1.0" authors = ["Juan Alvarez "] -edition = "2018" -license = "MIT" -documentation = "https://docs.rs/tonic-web/0.1.0/tonic-web/" -repository = "https://github.com/hyperium/tonic" -homepage = "https://github.com/hyperium/tonic" +categories = ["network-programming", "asynchronous"] description = """ grpc-web protocol translation for tonic services. """ -readme = "README.md" -categories = ["network-programming", "asynchronous"] +documentation = "https://docs.rs/tonic-web/0.1.0/tonic-web/" +edition = "2021" +homepage = "https://github.com/hyperium/tonic" keywords = ["rpc", "grpc", "grpc-web"] +license = "MIT" +name = "tonic-web" +readme = "README.md" +repository = "https://github.com/hyperium/tonic" +version = "0.1.0" [dependencies] -tonic = { version = "0.6", path = "../tonic", default-features = false, features = ["transport"] } -http = "0.2" base64 = "0.13" -futures-core = "0.3" bytes = "1.0" -hyper = "0.14" +futures-core = "0.3" +http = "0.2" http-body = "0.4" +hyper = "0.14" +pin-project = "1" +tonic = {version = "0.6", path = "../tonic", default-features = false, features = ["transport"]} tower-service = "0.3" tracing = "0.1" -pin-project = "1" [dev-dependencies] -tokio = { version = "1", features = ["macros", "rt"] } -tonic = { path = "../tonic", default-features = false, features = ["transport", "tls"] } +tokio = {version = "1", features = ["macros", "rt"]} +tonic = {path = "../tonic", default-features = false, features = ["transport", "tls"]} diff --git a/tonic-web/tests/integration/Cargo.toml b/tonic-web/tests/integration/Cargo.toml index 11de50089..63e5b97a3 100644 --- a/tonic-web/tests/integration/Cargo.toml +++ b/tonic-web/tests/integration/Cargo.toml @@ -1,19 +1,19 @@ [package] -name = "integration" -version = "0.1.0" authors = ["Juan Alvarez "] +edition = "2021" +name = "integration" publish = false -edition = "2018" +version = "0.1.0" [dependencies] -tonic = { path = "../../../tonic" } -tonic-web = { path = "../../../tonic-web" } -prost = "0.9" -tokio = { version = "1", features = ["macros", "rt", "net"] } base64 = "0.13" bytes = "1.0" -tokio-stream = { version = "0.1", features = ["net"] } hyper = "0.14" +prost = "0.9" +tokio = {version = "1", features = ["macros", "rt", "net"]} +tokio-stream = {version = "0.1", features = ["net"]} +tonic = {path = "../../../tonic"} +tonic-web = {path = "../../../tonic-web"} [build-dependencies] -tonic-build = { path = "../../../tonic-build" } +tonic-build = {path = "../../../tonic-build"} diff --git a/tonic/Cargo.toml b/tonic/Cargo.toml index 7d4f947b2..334ae5b45 100644 --- a/tonic/Cargo.toml +++ b/tonic/Cargo.toml @@ -8,97 +8,97 @@ name = "tonic" # - README.md # - Update CHANGELOG.md. # - Create "v0.6.x" git tag. -version = "0.6.0" authors = ["Lucio Franco "] -edition = "2018" -license = "MIT" -documentation = "https://docs.rs/tonic/0.6.0/tonic/" -repository = "https://github.com/hyperium/tonic" -homepage = "https://github.com/hyperium/tonic" +categories = ["web-programming", "network-programming", "asynchronous"] description = """ A gRPC over HTTP/2 implementation focused on high performance, interoperability, and flexibility. """ -readme = "../README.md" -categories = ["web-programming", "network-programming", "asynchronous"] +documentation = "https://docs.rs/tonic/0.6.0/tonic/" +edition = "2021" +homepage = "https://github.com/hyperium/tonic" keywords = ["rpc", "grpc", "async", "futures", "protobuf"] +license = "MIT" +readme = "../README.md" +repository = "https://github.com/hyperium/tonic" +version = "0.6.0" [features] -default = ["transport", "codegen", "prost"] codegen = ["async-trait"] -transport = [ - "h2", - "hyper", - "tokio", - "tower", - "tracing-futures", - "tokio/macros", - "tokio/time", - "hyper-timeout", -] +compression = ["flate2"] +default = ["transport", "codegen", "prost"] +prost = ["prost1", "prost-derive"] tls = ["transport", "tokio-rustls"] -tls-roots-common = ["tls"] tls-roots = ["tls-roots-common", "rustls-native-certs"] +tls-roots-common = ["tls"] tls-webpki-roots = ["tls-roots-common", "webpki-roots"] -prost = ["prost1", "prost-derive"] -compression = ["flate2"] +transport = [ + "h2", + "hyper", + "tokio", + "tower", + "tracing-futures", + "tokio/macros", + "tokio/time", + "hyper-timeout", +] # [[bench]] # name = "bench_main" # harness = false [dependencies] +base64 = "0.13" bytes = "1.0" -futures-core = { version = "0.3", default-features = false } -futures-util = { version = "0.3", default-features = false } -tracing = "0.1" +futures-core = {version = "0.3", default-features = false} +futures-util = {version = "0.3", default-features = false} http = "0.2" -base64 = "0.13" +tracing = "0.1" -percent-encoding = "2.1" -tower-service = "0.3" -tower-layer = "0.3" -tokio-util = { version = "0.6", features = ["codec"] } async-stream = "0.3" http-body = "0.4.2" +percent-encoding = "2.1" pin-project = "1.0" +tokio-util = {version = "0.6", features = ["codec"]} +tower-layer = "0.3" +tower-service = "0.3" # prost -prost1 = { package = "prost", version = "0.9", optional = true } -prost-derive = { version = "0.9", optional = true } +prost-derive = {version = "0.9", optional = true} +prost1 = {package = "prost", version = "0.9", optional = true} # codegen -async-trait = { version = "0.1.13", optional = true } +async-trait = {version = "0.1.13", optional = true} # transport -h2 = { version = "0.3", optional = true } -hyper = { version = "0.14.2", features = ["full"], optional = true } -tokio = { version = "1.0.1", features = ["net"], optional = true } +h2 = {version = "0.3", optional = true} +hyper = {version = "0.14.2", features = ["full"], optional = true} +hyper-timeout = {version = "0.4", optional = true} +tokio = {version = "1.0.1", features = ["net"], optional = true} tokio-stream = "0.1" -tower = { version = "0.4.7", features = ["balance", "buffer", "discover", "limit", "load", "make", "timeout", "util"], optional = true } -tracing-futures = { version = "0.2", optional = true } -hyper-timeout = { version = "0.4", optional = true } +tower = {version = "0.4.7", features = ["balance", "buffer", "discover", "limit", "load", "make", "timeout", "util"], optional = true} +tracing-futures = {version = "0.2", optional = true} # rustls -tokio-rustls = { version = "0.22", optional = true } -rustls-native-certs = { version = "0.5", optional = true } -webpki-roots = { version = "0.21.1", optional = true } +rustls-native-certs = {version = "0.5", optional = true} +tokio-rustls = {version = "0.22", optional = true} +webpki-roots = {version = "0.21.1", optional = true} # compression -flate2 = { version = "1.0", optional = true } +flate2 = {version = "1.0", optional = true} [dev-dependencies] -tokio = { version = "1.0", features = ["rt", "macros"] } -static_assertions = "1.0" -rand = "0.8" bencher = "0.1.5" quickcheck = "1.0" quickcheck_macros = "1.0" -tower = { version = "0.4.7", features = ["full"] } +rand = "0.8" +static_assertions = "1.0" +tokio = {version = "1.0", features = ["rt", "macros"]} +tower = {version = "0.4.7", features = ["full"]} [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] [[bench]] -name = "decode" harness = false +name = "decode"