Files
tonic/examples/Cargo.toml
T
David PedersenandGitHub 5aa8ae1fec feat(examples): add grpc-web example (#710)
Creates a server using tonic-web and a client that uses a regular
`hyper::Client` and issues a regular HTTP/1.1 request.
2021-07-09 18:02:43 +02:00

209 lines
4.0 KiB
TOML

[package]
name = "examples"
version = "0.1.0"
authors = ["Lucio Franco <[email protected]>"]
edition = "2018"
publish = false
license = "MIT"
[[bin]]
name = "helloworld-server"
path = "src/helloworld/server.rs"
[[bin]]
name = "helloworld-client"
path = "src/helloworld/client.rs"
[[bin]]
name = "blocking-client"
path = "src/blocking/client.rs"
[[bin]]
name = "routeguide-server"
path = "src/routeguide/server.rs"
[[bin]]
name = "routeguide-client"
path = "src/routeguide/client.rs"
[[bin]]
name = "authentication-client"
path = "src/authentication/client.rs"
[[bin]]
name = "authentication-server"
path = "src/authentication/server.rs"
[[bin]]
name = "load-balance-client"
path = "src/load_balance/client.rs"
[[bin]]
name = "load-balance-server"
path = "src/load_balance/server.rs"
[[bin]]
name = "dynamic-load-balance-client"
path = "src/dynamic_load_balance/client.rs"
[[bin]]
name = "dynamic-load-balance-server"
path = "src/dynamic_load_balance/server.rs"
[[bin]]
name = "tls-client"
path = "src/tls/client.rs"
[[bin]]
name = "tls-server"
path = "src/tls/server.rs"
[[bin]]
name = "tls-client-auth-server"
path = "src/tls_client_auth/server.rs"
[[bin]]
name = "tls-client-auth-client"
path = "src/tls_client_auth/client.rs"
[[bin]]
name = "tower-server"
path = "src/tower/server.rs"
[[bin]]
name = "tower-client"
path = "src/tower/client.rs"
[[bin]]
name = "timeout-server"
path = "src/timeout/server.rs"
[[bin]]
name = "timeout-client"
path = "src/timeout/client.rs"
[[bin]]
name = "multiplex-server"
path = "src/multiplex/server.rs"
[[bin]]
name = "multiplex-client"
path = "src/multiplex/client.rs"
[[bin]]
name = "gcp-client"
path = "src/gcp/client.rs"
[[bin]]
name = "tracing-client"
path = "src/tracing/client.rs"
[[bin]]
name = "tracing-server"
path = "src/tracing/server.rs"
[[bin]]
name = "uds-client"
path = "src/uds/client.rs"
[[bin]]
name = "uds-server"
path = "src/uds/server.rs"
[[bin]]
name = "interceptor-client"
path = "src/interceptor/client.rs"
[[bin]]
name = "interceptor-server"
path = "src/interceptor/server.rs"
[[bin]]
name = "hyper-warp-client"
path = "src/hyper_warp/client.rs"
[[bin]]
name = "hyper-warp-server"
path = "src/hyper_warp/server.rs"
[[bin]]
name = "health-server"
path = "src/health/server.rs"
[[bin]]
name = "reflection-server"
path = "src/reflection/server.rs"
[[bin]]
name = "autoreload-server"
path = "src/autoreload/server.rs"
[[bin]]
name = "optional-server"
path = "src/optional/server.rs"
[[bin]]
name = "hyper-warp-multiplex-client"
path = "src/hyper_warp_multiplex/client.rs"
[[bin]]
name = "hyper-warp-multiplex-server"
path = "src/hyper_warp_multiplex/server.rs"
[[bin]]
name = "compression-server"
path = "src/compression/server.rs"
[[bin]]
name = "compression-client"
path = "src/compression/client.rs"
[[bin]]
name = "mock"
path = "src/mock/mock.rs"
[[bin]]
name = "grpc-web-server"
path = "src/grpc-web/server.rs"
[[bin]]
name = "grpc-web-client"
path = "src/grpc-web/client.rs"
[dependencies]
tonic = { path = "../tonic", features = ["tls", "compression"] }
prost = "0.8"
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" }
# Required for routeguide
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
rand = "0.8"
# Tracing
tracing = "0.1.16"
tracing-subscriber = { version = "0.2", features = ["tracing-log"] }
tracing-attributes = "0.1"
tracing-futures = "0.2"
# Required for wellknown types
prost-types = "0.8"
# Hyper example
hyper = { version = "0.14", features = ["full"] }
warp = "0.3"
http = "0.2"
http-body = "0.4.2"
pin-project = "1.0"
# Health example
tonic-health = { path = "../tonic-health" }
# Reflection example
tonic-reflection = { path = "../tonic-reflection" }
listenfd = "0.3"
# grpc-web example
tonic-web = { path = "../tonic-web" }
bytes = "1"
[build-dependencies]
tonic-build = { path = "../tonic-build", features = ["prost", "compression"] }