# 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.95.0"
name = "rmcp-server-kit"
version = "1.11.0"
authors = ["rmcp-server-kit contributors"]
build = false
exclude = [
    "target/",
    "flycheck0/",
    "tmp/",
    "tests/artifacts/",
    ".github/",
    ".gitlab-ci.yml",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Reusable MCP server framework with auth, RBAC, and Streamable HTTP transport (built on the rmcp SDK)"
homepage = "https://github.com/andrico21/rmcp-server-kit"
documentation = "https://docs.rs/rmcp-server-kit"
readme = "README.md"
keywords = [
    "mcp",
    "rmcp",
    "server",
    "oauth",
    "rbac",
]
categories = [
    "network-programming",
    "web-programming::http-server",
    "authentication",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/andrico21/rmcp-server-kit"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[package.metadata.cargo-machete]
ignored = [
    "humantime-serde",
    "subtle",
]

[features]
default = []
metrics = ["dep:prometheus"]
oauth = [
    "dep:jsonwebtoken",
    "dep:urlencoding",
]
oauth-mtls-client = ["oauth"]
test-helpers = []

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

[[example]]
name = "api_key_rbac"
path = "examples/api_key_rbac.rs"

[[example]]
name = "minimal_server"
path = "examples/minimal_server.rs"

[[example]]
name = "oauth_server"
path = "examples/oauth_server.rs"
required-features = ["oauth"]

[[test]]
name = "crl_discovery_ratelimit"
path = "tests/crl_discovery_ratelimit.rs"

[[test]]
name = "crl_map_bounds"
path = "tests/crl_map_bounds.rs"

[[test]]
name = "crl_ssrf"
path = "tests/crl_ssrf.rs"

[[test]]
name = "docs_citations"
path = "tests/docs_citations.rs"

[[test]]
name = "e2e"
path = "tests/e2e.rs"

[[test]]
name = "e2e_oauth_mtls"
path = "tests/e2e_oauth_mtls.rs"

[[test]]
name = "jwks_key_cap"
path = "tests/jwks_key_cap.rs"

[[test]]
name = "jwks_redirect_ssrf"
path = "tests/jwks_redirect_ssrf.rs"

[[test]]
name = "limiter_memory"
path = "tests/limiter_memory.rs"

[[test]]
name = "oauth_http_client"
path = "tests/oauth_http_client.rs"

[[test]]
name = "oauth_url_validation"
path = "tests/oauth_url_validation.rs"

[[test]]
name = "properties"
path = "tests/properties.rs"

[[test]]
name = "ssrf_resolver"
path = "tests/ssrf_resolver.rs"

[[bench]]
name = "hook_latency"
path = "benches/hook_latency.rs"
harness = false

[[bench]]
name = "rbac_redaction"
path = "benches/rbac_redaction.rs"
harness = false

[dependencies.anyhow]
version = "1"

[dependencies.arc-swap]
version = "1"

[dependencies.argon2]
version = "0.5"

[dependencies.axum]
version = "0.8"

[dependencies.base64]
version = "0.22"

[dependencies.chrono]
version = "0.4"
features = ["clock"]
default-features = false

[dependencies.governor]
version = "0.10"

[dependencies.hmac]
version = "0.13"

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

[dependencies.humantime]
version = "2"

[dependencies.humantime-serde]
version = "1"

[dependencies.jsonwebtoken]
version = "10.3"
features = ["rust_crypto"]
optional = true

[dependencies.prometheus]
version = "0.14"
optional = true

[dependencies.rand]
version = "0.10"

[dependencies.reqwest]
version = "0.13.3"
features = [
    "rustls-no-provider",
    "json",
]
default-features = false

[dependencies.rmcp]
version = "1.7"
features = [
    "server",
    "transport-streamable-http-server",
    "transport-io",
    "macros",
]

[dependencies.rustls]
version = "0.23"
features = [
    "ring",
    "logging",
    "tls12",
]
default-features = false

[dependencies.secrecy]
version = "0.10"
features = ["serde"]

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

[dependencies.serde_json]
version = "1"

[dependencies.sha2]
version = "0.11"

[dependencies.shlex]
version = "2"

[dependencies.subtle]
version = "2"

[dependencies.thiserror]
version = "2"

[dependencies.tokio]
version = "1"
features = [
    "net",
    "signal",
    "macros",
    "rt",
    "fs",
]

[dependencies.tokio-rustls]
version = "0.26"
features = ["ring"]
default-features = false

[dependencies.tokio-util]
version = "0.7"
features = ["rt"]

[dependencies.toml]
version = "1"

[dependencies.tower]
version = "0.5"
features = [
    "util",
    "timeout",
    "limit",
    "load-shed",
]

[dependencies.tower-http]
version = "0.6"
features = [
    "trace",
    "cors",
    "limit",
    "timeout",
    "set-header",
    "compression-gzip",
    "compression-br",
]

[dependencies.tracing]
version = "0.1"

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

[dependencies.url]
version = "2"

[dependencies.urlencoding]
version = "2"
optional = true

[dependencies.x509-parser]
version = "0.18"

[dev-dependencies.criterion]
version = "0.8"
features = ["cargo_bench_support"]
default-features = false

[dev-dependencies.memory-stats]
version = "1"

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

[dev-dependencies.rcgen]
version = "0.14"

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

[dev-dependencies.rsa]
version = "0.9"

[dev-dependencies.temp-env]
version = "0.3.6"

[dev-dependencies.tokio]
version = "1"
features = [
    "rt-multi-thread",
    "macros",
    "fs",
]

[dev-dependencies.wiremock]
version = "0.6"

[lints.clippy]
await_holding_lock = "deny"
box_collection = "warn"
clone_on_ref_ptr = "deny"
cognitive_complexity = "warn"
dbg_macro = "deny"
doc_markdown = "allow"
duration_suboptimal_units = "allow"
exhaustive_enums = "warn"
exhaustive_structs = "warn"
expect_used = "deny"
fallible_impl_from = "deny"
fn_params_excessive_bools = "deny"
implicit_clone = "warn"
indexing_slicing = "deny"
large_enum_variant = "warn"
must_use_candidate = "warn"
needless_pass_by_value = "warn"
panic = "deny"
print_stderr = "deny"
print_stdout = "deny"
rc_buffer = "warn"
redundant_clone = "warn"
str_to_string = "allow"
string_slice = "warn"
todo = "deny"
too_many_lines = "warn"
unimplemented = "deny"
unneeded_field_pattern = "warn"
unreachable = "warn"
unwrap_used = "deny"
wildcard_enum_match_arm = "deny"

[lints.clippy.all]
level = "deny"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.rust]
missing_debug_implementations = "warn"
missing_docs = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unreachable_pub = "warn"
unsafe_code = "forbid"
unused_extern_crates = "warn"
unused_import_braces = "warn"
unused_qualifications = "warn"

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"
strip = "symbols"
