# 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 = "2021"
name = "lemmy_api_common"
version = "0.19.4-rc.8"
description = "A link aggregator for the fediverse"
homepage = "https://join-lemmy.org/"
documentation = "https://join-lemmy.org/docs/en/index.html"
readme = "README.md"
license = "AGPL-3.0"
repository = "https://github.com/LemmyNet/lemmy"

[package.metadata.cargo-machete]
ignored = ["getrandom"]

[lib]
name = "lemmy_api_common"
path = "src/lib.rs"
doctest = false

[dependencies.activitypub_federation]
version = "0.5.6"
features = ["actix-web"]
optional = true
default-features = false

[dependencies.actix-web]
version = "4.6.0"
features = [
    "macros",
    "rustls-0_23",
    "compress-brotli",
    "compress-gzip",
    "compress-zstd",
    "cookies",
]
optional = true
default-features = false

[dependencies.anyhow]
version = "1.0.86"
features = ["backtrace"]

[dependencies.chrono]
version = "0.4.38"
features = ["serde"]
default-features = false

[dependencies.encoding_rs]
version = "0.8.34"
optional = true

[dependencies.enum-map]
version = "2.7"

[dependencies.futures]
version = "0.3.30"
optional = true

[dependencies.getrandom]
version = "0.2.15"
features = ["js"]

[dependencies.jsonwebtoken]
version = "9.3.0"
optional = true

[dependencies.lemmy_db_schema]
version = "=0.19.4-rc.8"

[dependencies.lemmy_db_views]
version = "=0.19.4-rc.8"

[dependencies.lemmy_db_views_actor]
version = "=0.19.4-rc.8"

[dependencies.lemmy_db_views_moderator]
version = "=0.19.4-rc.8"

[dependencies.lemmy_utils]
version = "=0.19.4-rc.8"
default-features = false

[dependencies.mime]
version = "0.3.17"
optional = true

[dependencies.moka]
version = "0.12.7"
features = ["future"]

[dependencies.once_cell]
version = "1.19.0"
optional = true

[dependencies.regex]
version = "1.10.4"

[dependencies.reqwest]
version = "0.11.27"
features = [
    "json",
    "blocking",
    "gzip",
]
optional = true

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

[dependencies.rosetta-i18n]
version = "0.1.3"
optional = true

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

[dependencies.serde_with]
version = "3.8.1"

[dependencies.tokio]
version = "1.37.0"
features = ["full"]
optional = true

[dependencies.tracing]
version = "0.1.40"
optional = true

[dependencies.ts-rs]
version = "7.1.1"
features = [
    "serde-compat",
    "chrono-impl",
    "no-serde-warnings",
]
optional = true

[dependencies.url]
version = "2.5.0"
features = ["serde"]

[dependencies.urlencoding]
version = "2.1.3"

[dependencies.uuid]
version = "1.8.0"
features = [
    "serde",
    "v4",
]
optional = true

[dependencies.webpage]
version = "2.0"
features = ["serde"]
optional = true
default-features = false

[dev-dependencies.pretty_assertions]
version = "1.4.0"

[dev-dependencies.reqwest-middleware]
version = "0.2.5"

[dev-dependencies.serial_test]
version = "3.1.1"

[features]
full = [
    "tracing",
    "rosetta-i18n",
    "lemmy_db_views/full",
    "lemmy_db_views_actor/full",
    "lemmy_db_views_moderator/full",
    "lemmy_utils/full",
    "activitypub_federation",
    "encoding_rs",
    "reqwest-middleware",
    "webpage",
    "ts-rs",
    "tokio",
    "uuid",
    "reqwest",
    "actix-web",
    "futures",
    "once_cell",
    "jsonwebtoken",
    "mime",
]

[lints.clippy]
cast_lossless = "deny"
dbg_macro = "deny"
explicit_into_iter_loop = "deny"
explicit_iter_loop = "deny"
get_first = "deny"
implicit_clone = "deny"
indexing_slicing = "deny"
inefficient_to_string = "deny"
items-after-statements = "deny"
manual_string_new = "deny"
needless_collect = "deny"
redundant_closure_for_method_calls = "deny"
uninlined_format_args = "allow"
unused_self = "deny"
unwrap_used = "deny"

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

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

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

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

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