[package]
edition = "2024"
rust-version = "1.85"
name = "kynos"
version = "0.3.0"
build = false
exclude = [
"cost/binary.tsv",
"cost/codec.tsv",
"cost/codegen.tsv",
"tests/ledger.rs",
"tests/metaschema.rs",
]
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "An idiomatic, performance-focused REST API framework with OpenAPI 3.1 and 3.2 support."
readme = "README.md"
keywords = [
"openapi",
"rest",
"api",
"http",
"framework",
]
categories = [
"web-programming::http-server",
"network-programming",
"asynchronous",
]
license = "MIT"
repository = "https://github.com/getkono/kynos"
[package.metadata.docs.rs]
all-features = true
[features]
assets = ["kynos-macros?/assets"]
assets-fs = [
"assets",
"unchecked",
"tokio/fs",
"tokio/io-util",
]
cache = []
compression = ["dep:async-compression"]
cookie = []
decimal = []
decimal-big = [
"decimal",
"dep:bigdecimal",
]
decimal-rust = [
"decimal",
"dep:rust_decimal",
]
default = [
"openapi31",
"macros",
"server",
"http1",
"http2",
"json",
"trace",
]
docs = []
form = ["dep:serde_urlencoded"]
full = [
"assets",
"cache",
"docs",
"openapi32",
"macros",
"server",
"http1",
"http2",
"json",
"tls",
"form",
"multipart",
"protobuf",
"cookie",
"compression",
"trace",
"yaml",
"test-util",
"uuid",
"time-chrono",
"time-jiff",
"decimal-rust",
"decimal-big",
]
http1 = [
"hyper/http1",
"hyper-util?/http1",
]
http2 = [
"hyper/http2",
"hyper-util?/http2",
]
json = []
macros = ["dep:kynos-macros"]
multipart = ["dep:multer"]
openapi31 = ["kynos-openapi/openapi31"]
openapi32 = [
"openapi31",
"kynos-openapi/openapi32",
"kynos-macros?/openapi32",
"dep:futures-core",
]
protobuf = ["dep:prost"]
server = [
"dep:hyper-util",
"dep:tracing",
"tokio/net",
"tokio/macros",
"tokio/rt",
"tokio/signal",
]
test-util = ["dep:jsonschema"]
time = []
time-chrono = [
"time",
"dep:chrono",
]
time-jiff = [
"time",
"dep:jiff",
]
tls = [
"server",
"dep:tokio-rustls",
]
trace = ["dep:tracing"]
unchecked = [
"dep:tower",
"dep:tower-service",
]
uuid = ["dep:uuid"]
yaml = [
"dep:serde_yaml_ng",
"kynos-openapi/yaml",
]
[lib]
name = "kynos"
path = "src/lib.rs"
[[example]]
name = "assets"
path = "examples/assets.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"assets-fs",
]
[[example]]
name = "auto_reload"
path = "examples/auto_reload.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
]
[[example]]
name = "cache"
path = "examples/cache.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
"cache",
]
[[example]]
name = "composition"
path = "examples/composition.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
]
[[example]]
name = "cors"
path = "examples/cors.rs"
required-features = [
"openapi31",
"macros",
"json",
]
[[example]]
name = "cost_codec"
path = "cost/codec.rs"
required-features = [
"openapi31",
"macros",
]
[[example]]
name = "cost_fixture"
path = "cost/fixture.rs"
[[example]]
name = "csrf"
path = "examples/csrf.rs"
required-features = [
"openapi31",
"macros",
"json",
"cookie",
]
[[example]]
name = "decompression"
path = "examples/decompression.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
"compression",
]
[[example]]
name = "docs_ui"
path = "examples/docs_ui.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
"docs",
]
[[example]]
name = "document"
path = "examples/document.rs"
required-features = [
"openapi32",
"macros",
"server",
"http1",
"json",
"yaml",
]
[[example]]
name = "errors"
path = "examples/errors.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
]
[[example]]
name = "graceful_shutdown"
path = "examples/graceful_shutdown.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
]
[[example]]
name = "hello"
path = "examples/hello.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
]
[[example]]
name = "jwt"
path = "examples/jwt.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
]
[[example]]
name = "localization"
path = "examples/localization.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
]
[[example]]
name = "localized_errors"
path = "examples/localized_errors.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
]
[[example]]
name = "middleware"
path = "examples/middleware.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
"compression",
"trace",
]
[[example]]
name = "negotiation"
path = "examples/negotiation.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
]
[[example]]
name = "opentelemetry"
path = "examples/opentelemetry.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
"trace",
]
[[example]]
name = "parameters"
path = "examples/parameters.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
"cookie",
]
[[example]]
name = "payloads"
path = "examples/payloads.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
"form",
"multipart",
]
[[example]]
name = "print_request_response"
path = "examples/print_request_response.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
]
[[example]]
name = "protobuf"
path = "examples/protobuf.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"protobuf",
]
[[example]]
name = "ranged"
path = "examples/ranged.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
]
[[example]]
name = "rate_limit"
path = "examples/rate_limit.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
]
[[example]]
name = "responses"
path = "examples/responses.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
]
[[example]]
name = "scalars"
path = "examples/scalars.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
"uuid",
"time-chrono",
"time-jiff",
"decimal-rust",
"decimal-big",
]
[[example]]
name = "schema"
path = "examples/schema.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
]
[[example]]
name = "security_schemes"
path = "examples/security_schemes.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
]
[[example]]
name = "sse"
path = "examples/sse.rs"
required-features = [
"openapi32",
"macros",
"server",
"http1",
"compression",
]
[[example]]
name = "state"
path = "examples/state.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
]
[[example]]
name = "streaming"
path = "examples/streaming.rs"
required-features = [
"openapi32",
"macros",
"server",
"http1",
"json",
]
[[example]]
name = "testing"
path = "examples/testing.rs"
required-features = [
"openapi31",
"macros",
"json",
"test-util",
]
[[example]]
name = "tls"
path = "examples/tls.rs"
required-features = [
"openapi31",
"server",
"http1",
"http2",
"tls",
]
[[example]]
name = "token_bucket"
path = "examples/token_bucket.rs"
test = true
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
]
[[example]]
name = "tracing"
path = "examples/tracing.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"trace",
]
[[example]]
name = "unchecked"
path = "examples/unchecked.rs"
required-features = [
"openapi31",
"macros",
"server",
"http1",
"json",
"unchecked",
]
[[test]]
name = "aliases"
path = "tests/aliases.rs"
[[test]]
name = "alloc"
path = "tests/alloc.rs"
[[test]]
name = "alloc_body"
path = "tests/alloc_body.rs"
[[test]]
name = "alloc_codecs"
path = "tests/alloc_codecs.rs"
[[test]]
name = "assets"
path = "tests/assets.rs"
required-features = [
"openapi31",
"macros",
"assets",
]
[[test]]
name = "cache"
path = "tests/cache.rs"
[[test]]
name = "client"
path = "tests/client.rs"
[[test]]
name = "conformance"
path = "tests/conformance.rs"
[[test]]
name = "conformance_corpus"
path = "tests/conformance_corpus.rs"
[[test]]
name = "cookies"
path = "tests/cookies.rs"
[[test]]
name = "cors"
path = "tests/cors.rs"
[[test]]
name = "derives"
path = "tests/derives.rs"
[[test]]
name = "description"
path = "tests/description.rs"
[[test]]
name = "determinism"
path = "tests/determinism.rs"
[[test]]
name = "dispatch"
path = "tests/dispatch.rs"
[[test]]
name = "docs"
path = "tests/docs.rs"
[[test]]
name = "errors"
path = "tests/errors.rs"
[[test]]
name = "flatten"
path = "tests/flatten.rs"
[[test]]
name = "hermeticity"
path = "tests/hermeticity.rs"
[[test]]
name = "interceptors"
path = "tests/interceptors.rs"
[[test]]
name = "limits"
path = "tests/limits.rs"
[[test]]
name = "localization"
path = "tests/localization.rs"
[[test]]
name = "matrix"
path = "tests/matrix.rs"
[[test]]
name = "middleware"
path = "tests/middleware.rs"
[[test]]
name = "panic-recovery-check"
path = "tests/compile/panic_recovery.rs"
harness = false
[[test]]
name = "panics"
path = "tests/panics.rs"
[[test]]
name = "pipeline"
path = "tests/pipeline.rs"
[[test]]
name = "ranged"
path = "tests/ranged.rs"
[[test]]
name = "rate_limit"
path = "tests/rate_limit.rs"
[[test]]
name = "reporting"
path = "tests/reporting.rs"
[[test]]
name = "routing"
path = "tests/routing.rs"
[[test]]
name = "size"
path = "tests/size.rs"
[[test]]
name = "sse"
path = "tests/sse.rs"
[[test]]
name = "typed_uri"
path = "tests/typed_uri.rs"
[[test]]
name = "ui"
path = "tests/ui.rs"
[[test]]
name = "unchecked"
path = "tests/unchecked.rs"
[dependencies.async-compression]
version = "0.4.19"
features = [
"tokio",
"gzip",
"brotli",
"zstd",
]
optional = true
[dependencies.bigdecimal]
version = "0.4.10"
optional = true
default-features = false
[dependencies.bytes]
version = "1.10.1"
[dependencies.chrono]
version = "0.4.45"
optional = true
default-features = false
[dependencies.futures-core]
version = "0.3.31"
optional = true
[dependencies.http]
version = "1.3.1"
[dependencies.http-body]
version = "1.0.1"
[dependencies.http-body-util]
version = "0.1.3"
[dependencies.hyper]
version = "1.7.0"
features = ["server"]
[dependencies.hyper-util]
version = "0.1.16"
features = [
"server",
"tokio",
]
optional = true
[dependencies.jiff]
version = "0.2.35"
optional = true
default-features = false
[dependencies.jsonschema]
version = "0.49.9"
optional = true
default-features = false
[dependencies.kynos-macros]
version = "0.3.0"
optional = true
[dependencies.kynos-openapi]
version = "0.3.0"
features = ["http"]
default-features = false
[dependencies.matchit]
version = "0.9.2"
[dependencies.multer]
version = "3.1.0"
optional = true
[dependencies.percent-encoding]
version = "2.3.2"
[dependencies.prost]
version = "0.14.4"
optional = true
[dependencies.rust_decimal]
version = "1.42.1"
optional = true
default-features = false
[dependencies.serde]
version = "1.0.219"
features = ["derive"]
[dependencies.serde_json]
version = "1.0.145"
[dependencies.serde_urlencoded]
version = "0.7.1"
optional = true
[dependencies.serde_yaml_ng]
version = "0.10.0"
optional = true
[dependencies.thiserror]
version = "2.0.19"
[dependencies.tokio]
version = "1.53.1"
features = [
"sync",
"time",
]
[dependencies.tokio-rustls]
version = "0.26.4"
features = [
"aws-lc-rs",
"logging",
"tls12",
]
optional = true
default-features = false
[dependencies.tower]
version = "0.5.2"
optional = true
[dependencies.tower-service]
version = "0.3.3"
optional = true
[dependencies.tracing]
version = "0.1.41"
optional = true
[dependencies.uuid]
version = "1.24.0"
optional = true
default-features = false
[dev-dependencies.alloc_counter]
version = "0.0.4"
features = ["std"]
default-features = false
[dev-dependencies.bigdecimal]
version = "0.4.10"
features = ["serde"]
default-features = false
[dev-dependencies.bytes]
version = "1.10.1"
[dev-dependencies.chrono]
version = "0.4.45"
features = [
"alloc",
"clock",
"serde",
]
default-features = false
[dev-dependencies.futures-core]
version = "0.3.31"
[dev-dependencies.http-body-util]
version = "0.1.3"
[dev-dependencies.hyper]
version = "1.7.0"
features = [
"client",
"http1",
"http2",
]
[dev-dependencies.jiff]
version = "0.2.35"
features = [
"std",
"serde",
"tzdb-bundle-always",
]
default-features = false
[dev-dependencies.jsonwebtoken]
version = "9.3.1"
default-features = false
[dev-dependencies.listenfd]
version = "1.0.2"
[dev-dependencies.moka]
version = "0.12.10"
features = ["future"]
default-features = false
[dev-dependencies.opentelemetry]
version = "0.32.0"
[dev-dependencies.opentelemetry-otlp]
version = "0.32.0"
features = [
"grpc-tonic",
"trace",
]
[dev-dependencies.opentelemetry-semantic-conventions]
version = "0.32.1"
[dev-dependencies.opentelemetry_sdk]
version = "0.32.1"
features = ["rt-tokio"]
[dev-dependencies.rcgen]
version = "0.14.9"
[dev-dependencies.rust_decimal]
version = "1.42.1"
features = ["serde"]
default-features = false
[dev-dependencies.rustls]
version = "0.23.43"
features = [
"ring",
"std",
]
default-features = false
[dev-dependencies.serde]
version = "1.0.219"
features = ["derive"]
[dev-dependencies.tokio]
version = "1.53.1"
features = [
"macros",
"rt-multi-thread",
]
[dev-dependencies.tower]
version = "0.5.2"
[dev-dependencies.tracing-opentelemetry]
version = "0.33.0"
[dev-dependencies.tracing-subscriber]
version = "0.3.20"
features = [
"env-filter",
"fmt",
]
[dev-dependencies.trybuild]
version = "1.0.111"
[dev-dependencies.uuid]
version = "1.24.0"
features = ["serde"]
default-features = false
[lints.clippy]
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
[lints.clippy.all]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
missing_debug_implementations = "warn"
missing_docs = "deny"
unreachable_pub = "warn"
unsafe_code = "forbid"
[lints.rust.rust_2018_idioms]
level = "warn"
priority = -1