# 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"
rust-version = "1.81"
name = "lemmy_utils"
version = "0.19.13-beta.1"
build = "build.rs"
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A link aggregator for the fediverse"
homepage = "https://join-lemmy.org/"
documentation = "https://join-lemmy.org/docs/en/index.html"
readme = false
license = "AGPL-3.0"
repository = "https://github.com/LemmyNet/lemmy"

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

[[bin]]
name = "lemmy_util_bin"
path = "src/main.rs"
required-features = ["full"]

[dependencies.actix-web]
version = "4.8.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"]
optional = true

[dependencies.cfg-if]
version = "1"

[dependencies.clearurls]
version = "0.0.4"
features = ["linkify"]

[dependencies.deser-hjson]
version = "2.2.4"
optional = true

[dependencies.diesel]
version = "2.1.6"
features = ["chrono"]
optional = true

[dependencies.doku]
version = "0.21.1"
features = [
    "url-2",
    "url-2",
]
optional = true

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

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

[dependencies.git-version]
version = "0.3.9"

[dependencies.html2text]
version = "0.12.6"
optional = true

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

[dependencies.itertools]
version = "0.13.0"
optional = true

[dependencies.lettre]
version = "0.11.7"
features = [
    "builder",
    "tokio1",
    "tokio1-rustls-tls",
    "smtp-transport",
]
optional = true
default-features = false

[dependencies.markdown-it]
version = "0.6.1"
optional = true

[dependencies.regex]
version = "1.11.1"
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.219"
features = ["derive"]

[dependencies.serde_json]
version = "1.0.140"
features = ["preserve_order"]
optional = true

[dependencies.smart-default]
version = "0.7.1"
optional = true

[dependencies.strum]
version = "0.26.3"
features = ["derive"]

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

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

[dependencies.tracing-error]
version = "0.2.1"
optional = true

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

[dependencies.url]
version = "2.5.2"
features = ["serde"]
optional = true

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

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

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

[dev-dependencies.reqwest]
version = "0.11.27"
features = [
    "json",
    "blocking",
    "gzip",
    "rustls-tls",
]
default-features = false

[build-dependencies.rosetta-build]
version = "0.1.3"
default-features = false

[features]
full = [
    "dep:ts-rs",
    "dep:diesel",
    "dep:rosetta-i18n",
    "dep:actix-web",
    "dep:reqwest-middleware",
    "dep:tracing",
    "dep:actix-web",
    "dep:serde_json",
    "dep:anyhow",
    "dep:tracing-error",
    "dep:http",
    "dep:deser-hjson",
    "dep:regex",
    "dep:urlencoding",
    "dep:doku",
    "dep:url",
    "dep:smart-default",
    "dep:enum-map",
    "dep:futures",
    "dep:tokio",
    "dep:html2text",
    "dep:lettre",
    "dep:uuid",
    "dep:itertools",
    "dep:markdown-it",
]

[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"
unimplemented = "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
