[workspace.package]
version = "1.0.0-alpha.0"
edition = "2021"
description = "A link aggregator for the fediverse"
license = "AGPL-3.0"
homepage = "https://join-lemmy.org/"
documentation = "https://join-lemmy.org/docs/en/index.html"
repository = "https://github.com/LemmyNet/lemmy"

[package]
name = "lemmy_server"
version.workspace = true
edition.workspace = true
description.workspace = true
license.workspace = true
homepage.workspace = true
documentation.workspace = true
repository.workspace = true
publish = false

[lib]
doctest = false

[lints]
workspace = true

# See https://github.com/johnthagen/min-sized-rust for additional optimizations
[profile.release]
lto = "fat"
opt-level = 3     # Optimize for speed, not size.
codegen-units = 1 # Reduce parallel code generation.

# This profile significantly speeds up build time. If debug info is needed you can comment the line
# out temporarily, but make sure to leave this in the main branch.
[profile.dev]
debug = 0

[features]
json-log = ["tracing-subscriber/json"]
default = []

[workspace]
members = [
  "crates/api",
  "crates/api_crud",
  "crates/api_common",
  "crates/apub",
  "crates/utils",
  "crates/db_perf",
  "crates/db_schema",
  "crates/db_views",
  "crates/routes",
  "crates/federate",
]

[workspace.lints.clippy]
cast_lossless = "deny"
complexity = { level = "deny", priority = -1 }
correctness = { level = "deny", priority = -1 }
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"
perf = { level = "deny", priority = -1 }
redundant_closure_for_method_calls = "deny"
style = { level = "deny", priority = -1 }
suspicious = { level = "deny", priority = -1 }
uninlined_format_args = "allow"
unused_self = "deny"
unwrap_used = "deny"
unimplemented = "deny"
unused_async = "deny"
map_err_ignore = "deny"
expect_used = "deny"

[workspace.dependencies]
lemmy_api = { version = "=1.0.0-alpha.0", path = "./crates/api" }
lemmy_api_crud = { version = "=1.0.0-alpha.0", path = "./crates/api_crud" }
lemmy_apub = { version = "=1.0.0-alpha.0", path = "./crates/apub" }
lemmy_utils = { version = "=1.0.0-alpha.0", path = "./crates/utils", default-features = false }
lemmy_db_schema = { version = "=1.0.0-alpha.0", path = "./crates/db_schema" }
lemmy_api_common = { version = "=1.0.0-alpha.0", path = "./crates/api_common" }
lemmy_routes = { version = "=1.0.0-alpha.0", path = "./crates/routes" }
lemmy_db_views = { version = "=1.0.0-alpha.0", path = "./crates/db_views" }
lemmy_federate = { version = "=1.0.0-alpha.0", path = "./crates/federate" }
activitypub_federation = { version = "0.6.2", default-features = false, features = [
  "actix-web",
] }
diesel = "2.2.7"
diesel_migrations = "2.2.0"
diesel-async = "0.5.2"
serde = { version = "1.0.217", features = ["derive"] }
serde_with = "3.12.0"
actix-web = { version = "4.9.0", default-features = false, features = [
  "compress-brotli",
  "compress-gzip",
  "compress-zstd",
  "cookies",
  "macros",
  "rustls-0_23",
] }
tracing = { version = "0.1.41", default-features = false }
tracing-actix-web = { version = "0.7.15", default-features = false }
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
url = { version = "2.5.4", features = ["serde"] }
reqwest = { version = "0.12.12", default-features = false, features = [
  "blocking",
  "gzip",
  "json",
  "rustls-tls",
] }
reqwest-middleware = "0.3.3"
reqwest-tracing = "0.5.5"
clokwerk = "0.4.0"
doku = { version = "0.21.1", features = ["url-2"] }
bcrypt = "0.17.0"
chrono = { version = "0.4.39", features = [
  "now",
  "serde",
], default-features = false }
serde_json = { version = "1.0.138", features = ["preserve_order"] }
base64 = "0.22.1"
uuid = { version = "1.13.1", features = ["serde"] }
async-trait = "0.1.86"
captcha = "0.0.9"
anyhow = { version = "1.0.95", features = ["backtrace"] }
diesel_ltree = "0.4.0"
serial_test = "3.2.0"
tokio = { version = "1.43.0", features = ["full"] }
regex = "1.11.1"
diesel-derive-newtype = "2.1.2"
diesel-derive-enum = { version = "2.1.0", features = ["postgres"] }
enum-map = { version = "2.7" }
strum = { version = "0.27.0", features = ["derive"] }
itertools = "0.14.0"
futures = "0.3.31"
http = "1.2"
rosetta-i18n = "0.1.3"
ts-rs = { version = "10.1.0", features = [
  "chrono-impl",
  "no-serde-warnings",
  "url-impl",
] }
rustls = { version = "0.23.23", features = ["ring"] }
futures-util = "0.3.31"
tokio-postgres = "0.7.13"
tokio-postgres-rustls = "0.13.0"
urlencoding = "2.1.3"
moka = { version = "0.12.10", features = ["future"] }
i-love-jesus = { version = "0.1.0" }
clap = { version = "4.5.29", features = ["derive", "env"] }
pretty_assertions = "1.4.1"
derive-new = "0.7.0"
tuplex = "0.1.2"

[dependencies]
lemmy_api = { workspace = true }
lemmy_api_crud = { workspace = true }
lemmy_apub = { workspace = true }
lemmy_utils = { workspace = true }
lemmy_db_schema = { workspace = true }
lemmy_api_common = { workspace = true }
lemmy_routes = { workspace = true }
lemmy_federate = { workspace = true }
activitypub_federation = { workspace = true }
actix-web = { workspace = true }
tracing = { workspace = true }
tracing-actix-web = { workspace = true }
tracing-subscriber = { workspace = true }
reqwest-middleware = { workspace = true }
reqwest-tracing = { workspace = true }
serde_json = { workspace = true }
rustls = { workspace = true }
tokio.workspace = true
clap = { workspace = true }
mimalloc = "0.1.43"
