[package] name = "chuchi" description = "Http async library based on hyper and tokio" version = "0.1.3" authors = ["Sören Meier "] repository = "https://github.com/chuchi-dev/chuchi-rs" edition = "2021" license = "MIT OR Apache-2.0" categories = ["web-programming"] rust-version = "1.74" [features] default = ["http1"] json = [ "dep:serde", "dep:serde_json", "chuchi-core/json", "chuchi-codegen/json", ] fs = ["tokio/fs", "dep:percent-encoding", "dep:rand"] http1 = ["hyper-util/http1"] http2 = ["hyper-util/http2"] ws = [ "dep:tokio-tungstenite", "dep:futures-util", "dep:base64", "dep:sha-1", "chuchi-codegen/ws", ] ## GraphQl is unstable graphql = ["json", "dep:juniper"] sentry = ["dep:sentry-core"] testing = [] api = ["json", "chuchi-core/query", "chuchi-codegen/api"] api-stream = ["api", "ws", "chuchi-codegen/stream", "tokio/macros"] [[example]] name = "catcher" test = true [[example]] name = "cors" test = true [[example]] name = "hello_world" test = true [[example]] name = "post" test = true [[example]] name = "read_json" required-features = ["json"] test = true [[example]] name = "static_files" required-features = ["fs"] test = true [[example]] name = "with_file" required-features = ["fs"] test = true [[example]] name = "write_json" required-features = ["json"] test = true [[test]] name = "default_features" required-features = ["http1"] [[test]] name = "json" required-features = ["http1", "json"] [[test]] name = "fs" required-features = ["http1", "fs"] [[test]] name = "ws" required-features = ["http1", "ws"] [[test]] name = "api_basic" required-features = ["http1", "api", "testing"] [[test]] name = "api_stream" required-features = ["http1", "api", "testing", "api-stream"] [dependencies] chuchi-core = { version = "0.1.0", path = "../chuchi-core" } hyper = { version = "1.2", features = ["server"] } hyper-util = { version = "0.1.3", features = ["tokio", "server"] } bytes = "1.0" serde_json = { version = "1.0", optional = true } serde = { version = "1.0", features = ["derive"], optional = true } tokio = { version = "1.0", features = ["net"] } percent-encoding = { version = "2.1", optional = true } rand = { version = "0.8", optional = true } tracing = { version = "0.1" } tokio-tungstenite = { version = "0.23", default-features = false, optional = true } futures-util = { version = "0.3.5", default-features = false, optional = true } base64 = { version = "0.22", optional = true } sha-1 = { version = "0.10", optional = true } chuchi-codegen = { version = "0.1.0", path = "../chuchi-codegen" } juniper = { version = "0.16", default-features = false, optional = true } matchit = "0.8" byte-parser = "0.2" thiserror = "1.0.58" sentry-core = { version = "0.34", features = ["client"], optional = true } [dev-dependencies] serde = { version = "1.0", features = ["derive"] } tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } hyper = { version = "1.2", features = ["server", "client"] } hyper-util = { version = "0.1", features = ["client", "client-legacy"] } tracing-subscriber = "0.3" tracing-test = { version = "0.2.4", features = ["no-env-filter"] } tokio-tungstenite = { version = "0.23", default-features = false } [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"]