[package]
edition = "2024"
name = "camber"
version = "0.1.1"
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Opinionated async Rust for IO-bound services on top of Tokio"
homepage = "https://github.com/jostled-org/camber"
documentation = "https://docs.rs/camber"
readme = "README.md"
keywords = [
"tokio",
"async",
"http",
"runtime",
"middleware",
]
categories = [
"asynchronous",
"network-programming",
"web-programming::http-server",
"web-programming::http-client",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/jostled-org/camber"
resolver = "2"
[features]
acme = ["dep:rustls-acme"]
dns01 = ["dep:instant-acme"]
grpc = [
"dep:tonic",
"dep:tonic-reflection",
"dep:tonic-health",
"dep:prost",
]
jemalloc = ["dep:tikv-jemallocator"]
mimalloc = ["dep:mimalloc-crate"]
nats = ["dep:async-nats"]
otel = [
"dep:opentelemetry",
"dep:opentelemetry_sdk",
"dep:opentelemetry-otlp",
"dep:tracing-opentelemetry",
]
profiling = ["dep:pprof"]
sqs = [
"dep:aws-sdk-sqs",
"dep:aws-config",
]
ws = ["dep:tokio-tungstenite"]
[lib]
name = "camber"
path = "src/lib.rs"
[[test]]
name = "acme_core"
path = "tests/acme_core.rs"
[[test]]
name = "async_client"
path = "tests/async_client.rs"
[[test]]
name = "async_schedule"
path = "tests/async_schedule.rs"
[[test]]
name = "async_task"
path = "tests/async_task.rs"
[[test]]
name = "auto_tls"
path = "tests/auto_tls.rs"
[[test]]
name = "bidirectional"
path = "tests/bidirectional.rs"
[[test]]
name = "binary_body"
path = "tests/binary_body.rs"
[[test]]
name = "body_limit"
path = "tests/body_limit.rs"
[[test]]
name = "builder"
path = "tests/builder.rs"
[[test]]
name = "cancellation"
path = "tests/cancellation.rs"
[[test]]
name = "channels"
path = "tests/channels.rs"
[[test]]
name = "channels_crossbeam"
path = "tests/channels_crossbeam.rs"
[[test]]
name = "circuit_breaker"
path = "tests/circuit_breaker.rs"
[[test]]
name = "client_methods"
path = "tests/client_methods.rs"
[[test]]
name = "client_timeouts"
path = "tests/client_timeouts.rs"
[[test]]
name = "compression"
path = "tests/compression.rs"
[[test]]
name = "config"
path = "tests/config.rs"
[[test]]
name = "connection_limit"
path = "tests/connection_limit.rs"
[[test]]
name = "cookies"
path = "tests/cookies.rs"
[[test]]
name = "cors"
path = "tests/cors.rs"
[[test]]
name = "dns01"
path = "tests/dns01.rs"
[[test]]
name = "e2e_twenty_minutes"
path = "tests/e2e_twenty_minutes.rs"
[[test]]
name = "e2e_v02"
path = "tests/e2e_v02.rs"
[[test]]
name = "e2e_v04"
path = "tests/e2e_v04.rs"
[[test]]
name = "e2e_v07"
path = "tests/e2e_v07.rs"
[[test]]
name = "e2e_v08"
path = "tests/e2e_v08.rs"
[[test]]
name = "e2e_v2"
path = "tests/e2e_v2.rs"
[[test]]
name = "error_paths"
path = "tests/error_paths.rs"
[[test]]
name = "every_async_notified"
path = "tests/every_async_notified.rs"
[[test]]
name = "form_body"
path = "tests/form_body.rs"
[[test]]
name = "grpc"
path = "tests/grpc.rs"
[[test]]
name = "health_check"
path = "tests/health_check.rs"
[[test]]
name = "host_routing"
path = "tests/host_routing.rs"
[[test]]
name = "http2"
path = "tests/http2.rs"
[[test]]
name = "http_background"
path = "tests/http_background.rs"
[[test]]
name = "http_router"
path = "tests/http_router.rs"
[[test]]
name = "http_server"
path = "tests/http_server.rs"
[[test]]
name = "hyper_transport"
path = "tests/hyper_transport.rs"
[[test]]
name = "json"
path = "tests/json.rs"
[[test]]
name = "keepalive"
path = "tests/keepalive.rs"
[[test]]
name = "logging"
path = "tests/logging.rs"
[[test]]
name = "logging_init"
path = "tests/logging_init.rs"
[[test]]
name = "metrics"
path = "tests/metrics.rs"
[[test]]
name = "metrics_init"
path = "tests/metrics_init.rs"
[[test]]
name = "middleware"
path = "tests/middleware.rs"
[[test]]
name = "mpsc_channel"
path = "tests/mpsc_channel.rs"
[[test]]
name = "multipart"
path = "tests/multipart.rs"
[[test]]
name = "nats"
path = "tests/nats.rs"
[[test]]
name = "on_cancel"
path = "tests/on_cancel.rs"
[[test]]
name = "on_shutdown"
path = "tests/on_shutdown.rs"
[[test]]
name = "otel"
path = "tests/otel.rs"
required-features = ["otel"]
[[test]]
name = "path_params"
path = "tests/path_params.rs"
[[test]]
name = "pool_integration"
path = "tests/pool_integration.rs"
[[test]]
name = "profiling"
path = "tests/profiling.rs"
[[test]]
name = "proxy"
path = "tests/proxy.rs"
[[test]]
name = "proxy_streaming"
path = "tests/proxy_streaming.rs"
[[test]]
name = "proxy_ws"
path = "tests/proxy_ws.rs"
[[test]]
name = "query_params"
path = "tests/query_params.rs"
[[test]]
name = "race"
path = "tests/race.rs"
[[test]]
name = "rate_limit"
path = "tests/rate_limit.rs"
[[test]]
name = "request_builder"
path = "tests/request_builder.rs"
[[test]]
name = "resource"
path = "tests/resource.rs"
[[test]]
name = "response_constructors"
path = "tests/response_constructors.rs"
[[test]]
name = "response_headers"
path = "tests/response_headers.rs"
[[test]]
name = "retry"
path = "tests/retry.rs"
[[test]]
name = "runtime_boundary"
path = "tests/runtime_boundary.rs"
[[test]]
name = "runtime_lifecycle"
path = "tests/runtime_lifecycle.rs"
[[test]]
name = "scheduled_tasks"
path = "tests/scheduled_tasks.rs"
[[test]]
name = "serve_async"
path = "tests/serve_async.rs"
[[test]]
name = "serve_variants"
path = "tests/serve_variants.rs"
[[test]]
name = "shutdown_phases"
path = "tests/shutdown_phases.rs"
[[test]]
name = "signals"
path = "tests/signals.rs"
[[test]]
name = "spawn_redesign"
path = "tests/spawn_redesign.rs"
[[test]]
name = "sqs_validation"
path = "tests/sqs_validation.rs"
[[test]]
name = "sse"
path = "tests/sse.rs"
[[test]]
name = "static_files"
path = "tests/static_files.rs"
[[test]]
name = "stream_response"
path = "tests/stream_response.rs"
[[test]]
name = "task_structured"
path = "tests/task_structured.rs"
[[test]]
name = "tcp_server"
path = "tests/tcp_server.rs"
[[test]]
name = "test_macro"
path = "tests/test_macro.rs"
[[test]]
name = "test_utilities"
path = "tests/test_utilities.rs"
[[test]]
name = "tls"
path = "tests/tls.rs"
[[test]]
name = "tls_core"
path = "tests/tls_core.rs"
[[test]]
name = "tls_raw"
path = "tests/tls_raw.rs"
[[test]]
name = "trait_impls"
path = "tests/trait_impls.rs"
[[test]]
name = "udp_socket"
path = "tests/udp_socket.rs"
[[test]]
name = "uds"
path = "tests/uds.rs"
[[test]]
name = "validation"
path = "tests/validation.rs"
[[test]]
name = "websocket"
path = "tests/websocket.rs"
[dependencies.arc-swap]
version = "1"
[dependencies.arrayvec]
version = "0.7"
[dependencies.async-nats]
version = "0.46"
optional = true
default-features = false
[dependencies.aws-config]
version = "1"
features = [
"rustls",
"rt-tokio",
]
optional = true
default-features = false
[dependencies.aws-sdk-sqs]
version = "1.93"
features = [
"rustls",
"rt-tokio",
]
optional = true
default-features = false
[dependencies.bytes]
version = "1"
[dependencies.camber-macros]
version = "0.1.1"
[dependencies.chrono]
version = "0.4"
features = ["now"]
default-features = false
[dependencies.cron]
version = "0.15"
[dependencies.crossbeam-channel]
version = "0.5"
[dependencies.flate2]
version = "1"
[dependencies.futures-util]
version = "0.3"
[dependencies.http-body-util]
version = "0.1"
[dependencies.hyper]
version = "1"
features = [
"http1",
"http2",
"server",
]
[dependencies.hyper-util]
version = "0.1"
features = [
"http1",
"http2",
"server",
"tokio",
]
[dependencies.instant-acme]
version = "0.8"
features = ["rcgen"]
optional = true
[dependencies.itoa]
version = "1"
[dependencies.metrics]
version = "0.24.3"
[dependencies.metrics-exporter-prometheus]
version = "0.18.1"
default-features = false
[dependencies.mimalloc-crate]
version = "0.1"
optional = true
package = "mimalloc"
[dependencies.opentelemetry]
version = "0.31"
optional = true
[dependencies.opentelemetry-otlp]
version = "0.31"
features = ["grpc-tonic"]
optional = true
[dependencies.opentelemetry_sdk]
version = "0.31"
features = ["rt-tokio"]
optional = true
[dependencies.pprof]
version = "0.15"
features = ["flamegraph"]
optional = true
[dependencies.prost]
version = "0.13"
optional = true
[dependencies.reqwest]
version = "0.12"
features = [
"rustls-tls-webpki-roots",
"stream",
"json",
]
default-features = false
[dependencies.rustls]
version = "0.23"
features = ["aws-lc-rs"]
[dependencies.rustls-acme]
version = "0.15"
features = [
"aws-lc-rs",
"webpki-roots",
]
optional = true
default-features = false
[dependencies.rustls-pemfile]
version = "2"
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.thiserror]
version = "2"
[dependencies.tikv-jemallocator]
version = "0.6"
optional = true
[dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"net",
"macros",
"signal",
"time",
]
[dependencies.tokio-rustls]
version = "0.26"
[dependencies.tokio-tungstenite]
version = "0.24"
optional = true
[dependencies.toml]
version = "0.8"
[dependencies.tonic]
version = "0.12"
features = [
"codegen",
"prost",
]
optional = true
default-features = false
[dependencies.tonic-health]
version = "0.12"
optional = true
default-features = false
[dependencies.tonic-reflection]
version = "0.12"
features = ["server"]
optional = true
default-features = false
[dependencies.tracing]
version = "0.1"
[dependencies.tracing-opentelemetry]
version = "0.32"
optional = true
[dependencies.tracing-subscriber]
version = "0.3"
features = ["json"]
[dependencies.webpki-roots]
version = "1"
[dev-dependencies.flate2]
version = "1"
[dev-dependencies.h2]
version = "0.4"
[dev-dependencies.http]
version = "1"
[dev-dependencies.hyper]
version = "1"
features = ["client"]
[dev-dependencies.metrics]
version = "0.24.3"
[dev-dependencies.prost]
version = "0.13"
[dev-dependencies.rcgen]
version = "0.13"
[dev-dependencies.rustls-acme]
version = "0.15"
features = [
"aws-lc-rs",
"webpki-roots",
]
default-features = false
[dev-dependencies.serde]
version = "1"
features = ["derive"]
[dev-dependencies.serde_json]
version = "1"
[dev-dependencies.signal-hook]
version = "0.3"
[dev-dependencies.tempfile]
version = "3"
[dev-dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"net",
"macros",
"signal",
"time",
"test-util",
]
[dev-dependencies.tokio-stream]
version = "0.1"
[dev-dependencies.tokio-util]
version = "0.7"
[dev-dependencies.tonic]
version = "0.12"
features = [
"codegen",
"prost",
"channel",
]
default-features = false
[dev-dependencies.tonic-health]
version = "0.12"
[dev-dependencies.tonic-reflection]
version = "0.12"
features = ["server"]
[dev-dependencies.tracing-subscriber]
version = "0.3"
features = ["registry"]
[dev-dependencies.tungstenite]
version = "0.24"
[dev-dependencies.wiremock]
version = "0.6"
[build-dependencies.camber-build]
version = "0.1.1"
[lints.clippy]
collapsible_match = "warn"
expect_used = "deny"
match_ref_pats = "warn"
match_same_arms = "warn"
match_single_binding = "warn"
needless_bool = "deny"
needless_late_init = "warn"
needless_match = "warn"
panic = "deny"
redundant_guards = "warn"
redundant_pattern = "warn"
redundant_pattern_matching = "warn"
single_match = "allow"
single_match_else = "allow"
todo = "deny"
unimplemented = "deny"
unreachable = "deny"
unwrap_used = "deny"
[lints.rust]
unsafe_code = "forbid"