[package]
name = "lemmy_utils"
version.workspace = true
edition.workspace = true
description.workspace = true
license.workspace = true
homepage.workspace = true
documentation.workspace = true
repository.workspace = true
rust-version.workspace = true

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

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

[lints]
workspace = true

[features]
full = [
  "diesel",
  "actix-web",
  "tracing",
  "actix-web",
  "serde_json",
  "anyhow",
  "http",
  "deser-hjson",
  "regex",
  "urlencoding",
  "doku",
  "url",
  "smart-default",
  "enum-map",
  "futures",
  "tokio",
  "itertools",
  "markdown-it",
  "moka",
  "actix-extensible-rate-limit",
  "dashmap",
]
ts-rs = ["dep:ts-rs"]

[package.metadata.cargo-shear]
ignored = ["http"]

[dependencies]
regex = { workspace = true, optional = true }
tracing = { workspace = true, optional = true }
itertools = { workspace = true, optional = true }
serde = { workspace = true }
serde_json = { workspace = true, optional = true }
url = { workspace = true, optional = true }
actix-web = { workspace = true, optional = true }
anyhow = { workspace = true, optional = true }
strum = { workspace = true }
futures = { workspace = true, optional = true }
diesel = { workspace = true, optional = true }
http = { workspace = true, optional = true }
doku = { workspace = true, features = ["url-2"], optional = true }
tokio = { workspace = true, optional = true }
urlencoding = { workspace = true, optional = true }
deser-hjson = { version = "2.2.5", optional = true }
smart-default = { version = "0.7.1", optional = true }
markdown-it = { version = "0.6.1", optional = true }
ts-rs = { workspace = true, optional = true }
enum-map = { version = "2.7", optional = true }
chrono = { workspace = true }
clearurls = { version = "0.0.4", features = ["linkify"] }
markdown-it-block-spoiler = "1.0.3"
markdown-it-sub = "1.0.2"
markdown-it-sup = "1.0.2"
markdown-it-ruby = "1.0.2"
markdown-it-footnote = "0.2.0"
moka = { workspace = true, optional = true }
git-version = "0.3.9"
unicode-segmentation = "1.12.0"
invisible-characters = "0.1.5"
actix-extensible-rate-limit = { version = "0.4.0", optional = true }
dashmap = { version = "6.1.0", optional = true }
serde_with = { workspace = true }

[dev-dependencies]
pretty_assertions = { workspace = true }
unified-diff = { workspace = true }
tokio = { workspace = true, features = ["test-util"] }
