# 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.93.0"
name = "csaf-crud"
version = "0.3.0"
authors = ["Pierre Gronau <Pierre.Gronau@ndaal.eu>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "CSAF 2.0 / 2.1 advisory CRUD server with HATEOAS JSON API and HTML UI (TLS 1.3, HTTP/1.1 + HTTP/2 + HTTP/3)"
homepage = "https://gitlab.com/vPierre/ndaal_public_csaf_crud"
documentation = "https://gitlab.com/vPierre/ndaal_public_csaf_crud"
readme = "README.md"
keywords = [
    "csaf",
    "security",
    "advisory",
    "vex",
    "oasis",
]
categories = [
    "command-line-utilities",
    "web-programming::http-server",
]
license = "Apache-2.0"
repository = "https://gitlab.com/vPierre/ndaal_public_csaf_crud"
resolver = "2"

[features]
default = ["quic"]
quic = [
    "dep:quinn",
    "dep:h3",
    "dep:h3-quinn",
]

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

[[bin]]
name = "csaf-crud"
path = "src/main.rs"

[dependencies.anyhow]
version = "1"

[dependencies.bytes]
version = "1"

[dependencies.csaf-core]
version = "0.3.0"

[dependencies.csaf-models]
version = "0.3.0"

[dependencies.h3]
version = "0.0.8"
optional = true

[dependencies.h3-quinn]
version = "0.0.10"
optional = true

[dependencies.http]
version = "1"

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

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

[dependencies.hyper-util]
version = "0.1"
features = [
    "tokio",
    "server-auto",
    "http1",
    "http2",
]

[dependencies.matchit]
version = "0.9"

[dependencies.mime_guess]
version = "2"

[dependencies.quinn]
version = "0.11"
optional = true

[dependencies.rcgen]
version = "0.14"

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

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

[dependencies.serde_json]
version = "1"

[dependencies.sysinfo]
version = "0.38"

[dependencies.time]
version = "0.3"

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

[dependencies.tokio-rustls]
version = "0.26"

[dependencies.tracing]
version = "0.1"

[dependencies.tracing-appender]
version = "0.2"

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

[lints.clippy]
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
derive_partial_eq_without_eq = "allow"
doc_markdown = "allow"
expect_used = "warn"
indexing_slicing = "warn"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
multiple_crate_versions = "allow"
must_use_candidate = "allow"
panic = "warn"
unwrap_used = "warn"

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

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

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

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

[lints.rust]
missing_docs = "warn"
unsafe_code = "deny"
