[package] name = "hrpc" version = "0.33.29" authors = ["Yusuf Bera Ertan "] edition = "2021" license = "MIT" repository = "https://github.com/harmony-development/hrpc-rs" homepage = "https://github.com/harmony-development/hrpc-rs" description = "Common code for hRPC." keywords = ["hrpc", "harmony", "rpc", "protobuf"] categories = ["network-programming"] include = [ "/src", "/build.rs", "/Cargo.toml", "/hrpc-main/protocol", "/README.md", ] [package.metadata.docs.rs] all-features = true [package.metadata.nix] build = true library = true [features] default = [] # Enable common server code server = ["_common", "matchit", "hrpc-proc-macro"] # Enable common client code client = ["_common"] # Internal feature used to indicate common server / client is enabled _common = [ "futures-util/unstable", "futures-util/bilock", "futures-util/sink", "futures-util/async-await-macro", "tower", "pin-project-lite", ] # Enables the mock client mock_client = ["client", "_common_mock"] # Enables the mock server mock_server = ["server", "_common_mock"] # Internal feature used in mock transport features _common_mock = [ "tokio", "tokio/rt", "tokio/sync", "futures-channel", "futures-channel/sink", "futures-channel/std", "client", ] # Enables the HTTP server http_server = [ "server", "_common_http", "websocket_tokio_tungstenite", "tokio/rt", "hyper", "axum-server", "sha-1", "base64", ] # Enables the `hyper` HTTP client http_hyper_client = [ "_common_http_client", "websocket_tokio_tungstenite", "hyper", "hyper-rustls", "hyper/client", ] # Enables the HTTP client that can compile to WASM http_wasm_client = [ "_common_http_client", "reqwasm", "js-sys", "wasm-bindgen", "websocket_wasm", "wasm-streams", "gloo-timers", ] # Internal feature used to indicate that a HTTP client is enabled _common_http_client = ["client", "_common_http"] # Internal feature used to indicate that HTTP is enabled _common_http = ["http", "http-body"] # Enable the tokio_tungstenite websocket implementation websocket_tokio_tungstenite = ["tokio-tungstenite", "tokio"] # Enable the wasm websocket implementation websocket_wasm = ["ws_stream_wasm"] [build-dependencies] prost-build = "0.10" [dependencies] # Core types, traits and utilities prost = "0.10" bytes = "1.0" futures-util = { version = "0.3", default-features = false, features = ["std"] } pin-project-lite = { version = "0.2", default-features = false, optional = true } # Re-exported by server hrpc-proc-macro = { version = "0.33.0", path = "../hrpc-proc-macro", optional = true } # Used by server for it's incredible Service trait and other utilities tower = { version = "0.4", default-features = false, features = [ "util", ], optional = true } # Logging tracing = { version = "0.1", default-features = false, features = ["std"] } # Http transport deps http = { version = "0.2", optional = true } http-body = { version = "0.4", optional = true } # Used by server for routing matchit = { version = "0.5", default-features = false, optional = true } # Used by server to implement WS request handling sha-1 = { version = "0.10", default-features = false, optional = true } base64 = { version = "0.13", default-features = false, optional = true } # Used by http server impl in ws handling tokio = { version = "1", default-features = false, optional = true } # Used by hyper client hyper = { version = "0.14", default-features = false, features = [ "http1", "http2", "runtime", "stream", ], optional = true } hyper-rustls = { version = "0.23", default-features = false, features = [ "native-tokio", "tls12", "http1", "http2", ], optional = true } tokio-tungstenite = { version = "0.17", default-features = false, features = [ "rustls-tls-native-roots", "connect", ], optional = true } axum-server = { version = "0.4", default-features = false, features = [ "tls-rustls", ], optional = true } # Used by wasm client reqwasm = { version = "0.5", default-features = false, features = [ "http", ], optional = true } ws_stream_wasm = { version = "0.7", default-features = false, optional = true } js-sys = { version = "0.3", default-features = false, optional = true } wasm-bindgen = { version = "0.2", default-features = false, optional = true } wasm-streams = { version = "0.2", default-features = false, optional = true } gloo-timers = { version = "0.2", default-features = false, features = [ "futures", ], optional = true } # used by mock client futures-channel = { version = "0.3", default-features = false, optional = true }