[package]
name = "sl-map-web"
description = "Web UI and JSON API for the SL map renderer"
readme = "README.md"
license = "MIT OR Apache-2.0"
version = "0.4.0"
authors = ["Matthias Hörmann <mhoermann@gmail.com>"]
edition = "2024"
# assert_matches! (used in tests) was stabilized in Rust 1.96.0
rust-version = "1.96.0"
repository = "https://github.com/taladar/sl-map-tools"
keywords = ["map", "route", "secondlife", "usb_notecard", "web"]
categories = ["web-programming::http-server"]

exclude = [
  ".env",
  "push-deploy-branches.sh",
  "tarpaulin-report.html",
  "tarpaulin-report.json",
]

[package.metadata.deb]
name = "sl-map-web"
depends = "$auto"
extended-description = "Web UI and JSON API for the SL map renderer"
section = "web"
copyright = "2026, Matthias Hörmann <mhoermann@gmail.com>"
assets = [
  ["target/release/sl_map_web", "usr/bin/", "755"],
  ["target/release/sl_map_web_register", "usr/bin/", "755"],
]
maintainer-scripts = "maintainer-scripts"
changelog = "changelog"
revision = "1"

[package.metadata.rpm.cargo]
buildflags = ["--release"]

[package.metadata.rpm.targets]
sl_map_web = { path = "/usr/bin/sl_map_web" }
sl_map_web_register = { path = "/usr/bin/sl_map_web_register" }

[package.metadata.generate-rpm]
assets = [
    { source = "target/release/sl_map_web", dest = "/usr/bin/sl_map_web", mode = "755" },
    { source = "target/release/sl_map_web_register", dest = "/usr/bin/sl_map_web_register", mode = "755" },
]

[dependencies]
ab_glyph = "0.2.32"
argon2 = "0.5.3"
axum = { version = "0.8", features = ["multipart", "macros"] }
axum-extra = { version = "0.12.6", features = ["cookie", "cookie-signed", "typed-header"] }
base64 = "0.22.1"
bytes = "1.12.0"
chrono = { version = "0.4.45", features = ["serde"] }
clap = { version = "4.6.1", features = ["cargo", "derive", "env"] }
fs-err = "3.3.0"
futures = "0.3.32"
hex_color = "3.0.0"
image = { version = "0.25.10", default-features = false, features = [
  "jpeg",
  "png",
  "rayon",
  "webp",
] }
ipnet = "2.12.0"
log-panics = { version = "2.1.0", features = ["with-backtrace"] }
rand = "0.10.1"
ratelimit = "2.0.0"
reqwest = { version = "0.13.4", default-features = false, features = ["blocking", "json", "native-tls-vendored"] }
secrecy = "0.10"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.150"
sha2 = "0.11.0"
sl-glw = { path = "../sl-glw", version = "0.2.0" }
sl-map-apis = { path = "../sl-map-apis", version = "0.6.0" }
sl-types = { path = "../sl-types", version = "0.6.0" }
sqlx = { version = "0.9.0", default-features = false, features = ["runtime-tokio", "sqlite", "macros", "migrate", "chrono", "uuid"] }
subtle = "2.6.1"
thiserror = "2.0.18"
time = "0.3.51"
tokio = { version = "1.52.3", features = ["full"] }
tokio-stream = { version = "0.1.18", features = ["sync"] }
tower = "0.5.3"
tower-http = { version = "0.7.0", features = ["trace", "compression-gzip", "set-header"] }
tracing = "0.1.44"
tracing-appender = "0.2.5"
tracing-subscriber = { version = "0.3.23", features = [
  "env-filter",
  "tracing-log",
] }
uuid = { version = "1.23.3", features = ["serde", "v4"] }
zeroize = "1"

[dev-dependencies]
# `unstable` enables pretty_assertions::assert_matches, which relies on the
# std assert_matches macro stabilised in Rust 1.96 (see package.rust-version).
pretty_assertions = { version = "1.4.1", features = ["unstable"] }
tempfile = "3.27.0"

[lints.clippy]
allow_attributes = "deny"
allow_attributes_without_reason = "deny"
arithmetic_side_effects = "deny"
as_conversions = "deny"
as_underscore = "deny"
assertions_on_result_states = "deny"
assigning_clones = "deny"
big_endian_bytes = "deny"
branches_sharing_code = "deny"
builtin_type_shadow = "deny"
byte_char_slices = "deny"
bytes_count_to_len = "deny"
bytes_nth = "deny"
cargo_common_metadata = "deny"
case_sensitive_file_extension_comparisons = "deny"
cast_abs_to_unsigned = "deny"
cast_enum_constructor = "deny"
cast_enum_truncation = "deny"
cast_lossless = "deny"
cast_nan_to_int = "deny"
cast_possible_truncation = "deny"
cast_possible_wrap = "deny"
cast_precision_loss = "deny"
cast_sign_loss = "deny"
cfg_not_test = "warn"
char_lit_as_u8 = "deny"
chars_last_cmp = "deny"
chars_next_cmp = "deny"
checked_conversions = "deny"
clear_with_drain = "deny"
clone_on_copy = "deny"
clone_on_ref_ptr = "deny"
cloned_instead_of_copied = "deny"
cloned_ref_to_slice_refs = "deny"
cmp_owned = "deny"
collection_is_never_read = "deny"
copy_iterator = "deny"
dbg_macro = "warn"
debug_assert_with_mut_call = "deny"
decimal_literal_representation = "warn"
default_constructed_unit_structs = "deny"
default_trait_access = "deny"
deref_by_slicing = "deny"
derivable_impls = "deny"
derive_partial_eq_without_eq = "deny"
disallowed_script_idents = "deny"
doc_broken_link = "deny"
doc_comment_double_space_linebreaks = "deny"
doc_lazy_continuation = "deny"
empty_drop = "deny"
# empty_enums might be an option once the never type is stabilized
empty_enum_variants_with_brackets = "deny"
empty_line_after_doc_comments = "deny"
empty_line_after_outer_attr = "deny"
empty_loop = "deny"
empty_structs_with_brackets = "deny"
enum_glob_use = "deny"
equatable_if_let = "deny"
expect_used = "deny"
expl_impl_clone_on_copy = "deny"
explicit_into_iter_loop = "deny"
explicit_iter_loop = "deny"
fallible_impl_from = "deny"
filter_map_next = "deny"
filter_next = "deny"
flat_map_identity = "deny"
flat_map_option = "deny"
float_cmp = "warn"
float_cmp_const = "warn"
fn_params_excessive_bools = "warn"
fn_to_numeric_cast_any = "deny"
format_collect = "deny"
format_push_string = "deny"
future_not_send = "warn"
ignore_without_reason = "deny"
ignored_unit_patterns = "deny"
incompatible_msrv = "deny"
index_refutable_slice = "warn"
indexing_slicing = "deny"
init_numbered_fields = "deny"
into_iter_without_iter = "deny"
items_after_statements = "deny"
items_after_test_module = "deny"
iter_kv_map = "deny"
large_types_passed_by_value = "deny"
len_without_is_empty = "deny"
let_underscore_must_use = "deny"
let_underscore_untyped = "deny"
linkedlist = "deny"
little_endian_bytes = "deny"
manual_instant_elapsed = "deny"
manual_is_power_of_two = "deny"
manual_let_else = "deny"
manual_midpoint = "deny"
map_err_ignore = "warn"
map_unwrap_or = "deny"
map_with_unused_argument_over_ranges = "deny"
match_same_arms = "warn"
mismatching_type_param_order = "deny"
missing_assert_message = "deny"
missing_const_for_fn = "warn"
missing_docs_in_private_items = "deny"
missing_enforced_import_renames = "deny"
missing_errors_doc = "deny"
missing_panics_doc = "deny"
mod_module_files = "deny"
module_name_repetitions = "warn"
multiple_inherent_impl = "warn"
must_use_candidate = "deny"
needless_bitwise_bool = "deny"
needless_for_each = "deny"
needless_pass_by_ref_mut = "deny"
needless_raw_string_hashes = "deny"
non_std_lazy_statics = "deny"
nonstandard_macro_braces = "warn"
option_option = "deny"
or_fun_call = "deny"
panic = "deny"
pathbuf_init_then_push = "deny"
print_stderr = "allow"
print_stdout = "allow"
pub_underscore_fields = "deny"
range_minus_one = "deny"
range_plus_one = "deny"
rc_mutex = "deny"
read_zero_byte_vec = "deny"
redundant_else = "deny"
redundant_feature_names = "deny"
ref_option = "warn"
renamed_function_params = "deny"
same_functions_in_if_condition = "deny"
semicolon_if_nothing_returned = "deny"
semicolon_inside_block = "deny"
set_contains_or_insert = "deny"
significant_drop_in_scrutinee = "deny"
significant_drop_tightening = "deny"
single_char_pattern = "deny"
string_add = "deny"
string_add_assign = "deny"
string_lit_chars_any = "deny"
string_slice = "deny"
struct_excessive_bools = "deny"
struct_field_names = "deny"
suspicious_operation_groupings = "warn"
suspicious_xor_used_as_pow = "deny"
tests_outside_test_module = "deny"
trivial_regex = "deny"
try_err = "deny"
type_repetition_in_bounds = "deny"
unchecked_time_subtraction = "deny"
undocumented_unsafe_blocks = "deny"
uninhabited_references = "deny"
uninlined_format_args = "warn"
unnecessary_box_returns = "warn"
unnecessary_join = "deny"
unnecessary_safety_doc = "warn"
unnecessary_self_imports = "warn"
unnested_or_patterns = "deny"
unreadable_literal = "deny"
unused_self = "warn"
unused_trait_names = "deny"
unwrap_used = "deny"
use_self = "deny"
verbose_bit_mask = "deny"
wildcard_dependencies = "deny"
wildcard_imports = "deny"
zero_sized_map_values = "deny"

[lints.rust]
absolute_paths_not_starting_with_crate = "deny"
ambiguous_negative_literals = "deny"
closure_returning_async_block = "warn"
confusable_idents = "deny"
deprecated = "deny"
let_underscore_drop = "deny"
macro_use_extern_crate = "deny"
missing_debug_implementations = "warn"
missing_docs = "warn"
non_ascii_idents = "deny"
non_fmt_panics = "forbid"
private_bounds = "forbid"
private_interfaces = "forbid"
redundant_imports = "deny"
redundant_lifetimes = "warn"
redundant_semicolons = "deny"
renamed_and_removed_lints = "deny"
single_use_lifetimes = "warn"
trivial_numeric_casts = "deny"
unit_bindings = "deny"
unknown_lints = "deny"
unnameable_types = "deny"
unreachable_code = "deny"
unreachable_patterns = "deny"
unreachable_pub = "deny"
unsafe_code = "forbid"
unstable_features = "forbid"
unused_doc_comments = "forbid"
unused_import_braces = "forbid"
unused_lifetimes = "deny"
unused_macro_rules = "deny"
unused_must_use = "forbid"
unused_parens = "deny"
variant_size_differences = "warn"
while_true = "deny"

[lints.rustdoc]
broken_intra_doc_links = "deny"
missing_crate_level_docs = "warn"
unescaped_backticks = "warn"
