[workspace.package]
version = "1.0.0-beta.1"
edition = "2024"
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"
rust-version = "1.92"

# 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

# Optimize procedural macros
[profile.dev.build-override]
opt-level = 1

[workspace]
members = [
  "crates/utils",
  "crates/db_schema",
  "crates/db_schema_file",
  "crates/diesel_utils",
  "crates/email",
  "crates/db_views/private_message",
  "crates/db_views/local_user",
  "crates/db_views/local_image",
  "crates/db_views/local_user_invite",
  "crates/db_views/person",
  "crates/db_views/post",
  "crates/db_views/vote",
  "crates/db_views/local_image",
  "crates/db_views/comment",
  "crates/db_views/community",
  "crates/db_views/community_moderator",
  "crates/db_views/community_follower",
  "crates/db_views/community_follower_approval",
  "crates/db_views/custom_emoji",
  "crates/db_views/notification",
  "crates/db_views/notification_sql",
  "crates/db_views/modlog",
  "crates/db_views/person_content_combined",
  "crates/db_views/person_saved_combined",
  "crates/db_views/person_liked_combined",
  "crates/db_views/post_comment_combined",
  "crates/db_views/report_combined",
  "crates/db_views/report_combined_sql",
  "crates/db_views/site",
  "crates/api/api",
  "crates/api/api_crud",
  "crates/api/api_common",
  "crates/api/api_utils",
  "crates/api/routes",
  "crates/api/routes_v3",
  "crates/apub/apub",
  "crates/apub/activities",
  "crates/apub/objects",
  "crates/apub/send",
  "crates/routes",
  "crates/server",
]
resolver = "3"

[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"
as_conversions = "deny"
large_futures = "deny"
tests_outside_test_module = "deny"
try_err = "deny"
unreachable = "deny"
string_slice = "deny"
same_name_method = "deny"
return_and_then = "deny"
ref_patterns = "deny"
redundant_type_annotations = "deny"
if_then_some_else_none = "deny"
allow_attributes = "deny"
unchecked_time_subtraction = "deny"

[workspace.dependencies]
lemmy_api = { version = "=1.0.0-beta.1", path = "./crates/api/api" }
lemmy_api_crud = { version = "=1.0.0-beta.1", path = "./crates/api/api_crud" }
lemmy_api_routes = { version = "=1.0.0-beta.1", path = "./crates/api/routes" }
lemmy_api_routes_v3 = { version = "=1.0.0-beta.1", path = "./crates/api/routes_v3" }
lemmy_apub = { version = "=1.0.0-beta.1", path = "./crates/apub/apub" }
lemmy_apub_activities = { version = "=1.0.0-beta.1", path = "./crates/apub/activities" }
lemmy_apub_objects = { version = "=1.0.0-beta.1", path = "./crates/apub/objects" }
lemmy_utils = { version = "=1.0.0-beta.1", path = "./crates/utils", default-features = false }
lemmy_db_schema = { version = "=1.0.0-beta.1", path = "./crates/db_schema" }
lemmy_db_schema_file = { version = "=1.0.0-beta.1", path = "./crates/db_schema_file" }
lemmy_diesel_utils = { version = "=1.0.0-beta.1", path = "./crates/diesel_utils" }
lemmy_api_utils = { version = "=1.0.0-beta.1", path = "./crates/api/api_utils" }
lemmy_routes = { version = "=1.0.0-beta.1", path = "./crates/routes" }
lemmy_apub_send = { version = "=1.0.0-beta.1", path = "./crates/apub/send" }
lemmy_email = { version = "=1.0.0-beta.1", path = "./crates/email" }
lemmy_db_views_comment = { version = "=1.0.0-beta.1", path = "./crates/db_views/comment" }
lemmy_db_views_community = { version = "=1.0.0-beta.1", path = "./crates/db_views/community" }
lemmy_db_views_community_follower = { version = "=1.0.0-beta.1", path = "./crates/db_views/community_follower" }
lemmy_db_views_community_follower_approval = { version = "=1.0.0-beta.1", path = "./crates/db_views/community_follower_approval" }
lemmy_db_views_community_moderator = { version = "=1.0.0-beta.1", path = "./crates/db_views/community_moderator" }
lemmy_db_views_custom_emoji = { version = "=1.0.0-beta.1", path = "./crates/db_views/custom_emoji" }
lemmy_db_views_notification = { version = "=1.0.0-beta.1", path = "./crates/db_views/notification" }
lemmy_db_views_notification_sql = { version = "=1.0.0-beta.1", path = "./crates/db_views/notification_sql" }
lemmy_db_views_local_image = { version = "=1.0.0-beta.1", path = "./crates/db_views/local_image" }
lemmy_db_views_local_user = { version = "=1.0.0-beta.1", path = "./crates/db_views/local_user" }
lemmy_db_views_modlog = { version = "=1.0.0-beta.1", path = "./crates/db_views/modlog" }
lemmy_db_views_person = { version = "=1.0.0-beta.1", path = "./crates/db_views/person" }
lemmy_db_views_person_content_combined = { version = "=1.0.0-beta.1", path = "./crates/db_views/person_content_combined" }
lemmy_db_views_person_liked_combined = { version = "=1.0.0-beta.1", path = "./crates/db_views/person_liked_combined" }
lemmy_db_views_person_saved_combined = { version = "=1.0.0-beta.1", path = "./crates/db_views/person_saved_combined" }
lemmy_db_views_post_comment_combined = { version = "=1.0.0-beta.1", path = "./crates/db_views/post_comment_combined" }
lemmy_db_views_post = { version = "=1.0.0-beta.1", path = "./crates/db_views/post" }
lemmy_db_views_private_message = { version = "=1.0.0-beta.1", path = "./crates/db_views/private_message" }
lemmy_db_views_registration_applications = { version = "=1.0.0-beta.1", path = "./crates/db_views/registration_applications" }
lemmy_db_views_report_combined = { version = "=1.0.0-beta.1", path = "./crates/db_views/report_combined" }
lemmy_db_views_report_combined_sql = { version = "=1.0.0-beta.1", path = "./crates/db_views/report_combined_sql" }
lemmy_db_views_site = { version = "=1.0.0-beta.1", path = "./crates/db_views/site" }
lemmy_db_views_vote = { version = "=1.0.0-beta.1", path = "./crates/db_views/vote" }
lemmy_db_views_local_user_invite = { version = "=1.0.0-beta.1", path = "./crates/db_views/local_user_invite" }
activitypub_federation = { version = "0.7.0-beta.11", default-features = false, features = [
  "actix-web",
] }
diesel = { version = "2.3.7", features = [
  "64-column-tables",
  "chrono",
  "postgres",
  "serde_json",
  "uuid",
] }
diesel_migrations = "2.3.1"
diesel-async = "0.8.0"
serde = { version = "1.0.228", features = ["derive"] }
serde_with = "3.18.0"
actix-web = { version = "4.13.0", default-features = false, features = [
  "compress-brotli",
  "compress-gzip",
  "compress-zstd",
  "cookies",
  "macros",
  "rustls-0_23",
] }
tracing = { version = "0.1.44", default-features = false }
tracing-actix-web = { version = "0.7.21", default-features = false }
tracing-subscriber = { version = "0.3.23", features = ["env-filter", "json"] }
url = { version = "2.5.8", features = ["serde"] }
reqwest = { version = "0.13.2", default-features = false, features = [
  "gzip",
  "json",
  "form",
  "rustls-no-provider",
] }
reqwest-middleware = { version = "0.5.1", features = ["form", "query"] }
reqwest-tracing = "0.7.0"
clokwerk = "0.4.0"
doku = { version = "0.21.1", features = ["url-2"] }
bcrypt = "0.19.0"
chrono = { version = "0.4.44", features = [
  "now",
  "serde",
], default-features = false }
serde_json = { version = "1.0.149", features = ["preserve_order"] }
base64 = "0.22.1"
rand = "0.10.0"
uuid = { version = "1.22.0", features = ["serde"] }
anyhow = { version = "1.0.102", features = ["backtrace"] }
diesel_ltree = "0.4.0"
serial_test = "3.4.0"
tokio = { version = "1.50.0", features = ["full"] }
regex = "1.12.3"
diesel-derive-newtype = "2.1.2"
diesel-derive-enum = { version = "2.1.0", features = ["postgres"] }
enum-map = { version = "2.7" }
strum = { version = "0.28.0", features = ["derive"] }
itertools = "0.14.0"
futures = "0.3.32"
futures-util = "0.3.32"
http = "1.4"
rosetta-i18n = "0.1.3"
ts-rs = { version = "12.0.1", features = [
  "chrono-impl",
  "no-serde-warnings",
  "url-impl",
] }
rustls = { version = "0.23.37", features = ["ring"], default-features = false }
tokio-postgres = "0.7.16"
tokio-postgres-rustls = "0.13.0"
urlencoding = "2.1.3"
moka = { version = "0.12.15", features = ["future"] }
i-love-jesus = { version = "0.3.0" }
clap = { version = "4.6.0", features = ["derive", "env"] }
pretty_assertions = "1.4.1"
derive-new = "0.7.0"
html2text = "0.16.7"
async-trait = "0.1.89"
either = { version = "1.15.0", features = ["serde"] }
extism = { version = "1.20.0", default-features = false, features = [
  "http",
  "register-filesystem",
  "register-http",
] }
extism-convert = "1.20.0"
unified-diff = "0.2.1"
diesel-uplete = { version = "0.2.0" }

# Speedup RSA key generation
# https://github.com/RustCrypto/RSA/blob/master/README.md#example
[profile.dev.package.num-bigint-dig]
opt-level = 3
