# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.85"
name = "socle"
version = "2.3.0"
authors = ["Gregoire Salingue"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Opinionated axum service bootstrap: telemetry, database, rate limiting, and shutdown in one builder"
readme = "README.md"
keywords = [
    "axum",
    "tower",
    "bootstrap",
    "http",
    "telemetry",
]
categories = [
    "web-programming::http-server",
    "asynchronous",
]
license = "MIT"
repository = "https://github.com/brefwiz/socle"

[package.metadata.docs.rs]
features = [
    "telemetry",
    "database",
    "ratelimit-memory",
    "dotenv",
    "validation",
    "cursor",
    "testing",
]
no-default-features = true

[features]
cursor = ["api-bones/base64"]
database = ["dep:sqlx"]
default = [
    "telemetry",
    "database",
    "ratelimit-memory",
    "openapi",
    "dotenv",
]
dotenv = ["dep:dotenvy"]
http-client = [
    "dep:reqwest",
    "dep:reqwest-middleware",
    "dep:opentelemetry",
    "dep:async-trait",
    "dep:http",
]
metrics = [
    "dep:opentelemetry",
    "dep:opentelemetry_sdk",
    "dep:opentelemetry-prometheus",
    "dep:prometheus",
]
openapi = [
    "dep:utoipa",
    "dep:utoipa-swagger-ui",
]
ratelimit = []
ratelimit-memory = [
    "ratelimit",
    "dep:governor",
]
telemetry = []
testing = ["dep:reqwest"]
testing-postgres = [
    "dep:testcontainers",
    "dep:testcontainers-modules",
    "dep:sqlx",
]
validation = ["dep:validator"]

[lib]
name = "socle"
path = "src/lib.rs"

[[example]]
name = "minimal"
path = "examples/minimal.rs"
required-features = ["telemetry"]

[[example]]
name = "with_database"
path = "examples/with_database.rs"
required-features = [
    "telemetry",
    "database",
]

[[example]]
name = "with_ratelimit"
path = "examples/with_ratelimit.rs"
required-features = [
    "telemetry",
    "ratelimit-memory",
]

[[test]]
name = "integration"
path = "tests/integration.rs"
required-features = ["testing"]

[dependencies.api-bones]
version = "4.0.1"
features = [
    "axum",
    "uuid",
]

[dependencies.async-trait]
version = "0.1"
optional = true

[dependencies.axum]
version = "0.8"
features = ["macros"]

[dependencies.chrono]
version = "0.4"
features = ["serde"]

[dependencies.dotenvy]
version = "0.15"
optional = true

[dependencies.figment]
version = "0.10"
features = [
    "env",
    "toml",
]

[dependencies.futures-util]
version = "0.3"

[dependencies.governor]
version = "0.10"
features = [
    "std",
    "dashmap",
]
optional = true
default-features = false

[dependencies.http]
version = "1"
optional = true

[dependencies.opentelemetry]
version = "0.31"
optional = true

[dependencies.opentelemetry-prometheus]
version = "0.31"
optional = true

[dependencies.opentelemetry_sdk]
version = "0.31"
features = ["metrics"]
optional = true
default-features = false

[dependencies.prometheus]
version = "0.14"
optional = true
default-features = false

[dependencies.reqwest]
version = "0.13"
features = [
    "json",
    "rustls",
]
optional = true
default-features = false

[dependencies.reqwest-middleware]
version = "0.5"
optional = true

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1"

[dependencies.sqlx]
version = "0.8"
features = [
    "runtime-tokio-rustls",
    "postgres",
    "migrate",
]
optional = true
default-features = false

[dependencies.testcontainers]
version = "0.27"
optional = true

[dependencies.testcontainers-modules]
version = "0.15"
features = ["postgres"]
optional = true

[dependencies.thiserror]
version = "2"

[dependencies.tokio]
version = "1"
features = ["full"]

[dependencies.tower]
version = "0.5"
features = ["util"]

[dependencies.tower-http]
version = "0.6"
features = [
    "trace",
    "cors",
    "catch-panic",
    "compression-full",
    "request-id",
    "util",
    "limit",
]

[dependencies.tracing]
version = "0.1"

[dependencies.tracing-subscriber]
version = "0.3"
features = [
    "env-filter",
    "json",
]

[dependencies.utoipa]
version = "5"
optional = true

[dependencies.utoipa-swagger-ui]
version = "9"
features = ["axum"]
optional = true
default-features = false

[dependencies.uuid]
version = "1"
features = [
    "v7",
    "v5",
]

[dependencies.validator]
version = "0.20"
features = ["derive"]
optional = true

[dev-dependencies.bytes]
version = "1"

[dev-dependencies.http-body-util]
version = "0.1"

[dev-dependencies.opentelemetry_sdk]
version = "0.31"
features = ["trace"]

[dev-dependencies.reqwest]
version = "0.13"
features = [
    "json",
    "rustls",
]
default-features = false

[dev-dependencies.serde_json]
version = "1"

[dev-dependencies.sqlx]
version = "0.8"
features = [
    "runtime-tokio-rustls",
    "postgres",
]
default-features = false

[dev-dependencies.tempfile]
version = "3"

[dev-dependencies.tokio]
version = "1"
features = [
    "full",
    "test-util",
]
