[package]
name = "imap-tools"
version = "1.6.2"
edition = "2021"
license = "MIT"
description = "A collection of tools to manipulate IMAP mailboxes"
readme = "README.md"
keywords = ["IMAP"]
homepage = "https://gitlab.com/mat813/imap-tools-rs"
repository = "https://gitlab.com/mat813/imap-tools-rs"

[profile.release]
codegen-units = 1
lto = true
opt-level = "z"
panic = "abort"

# cargo watch -x "build --profile dev-rustls --no-default-features -F rustls" -x "build --profile dev-openssl --no-default-features -F openssl"
[profile.dev-openssl]
inherits = "dev"

[profile.dev-rustls]
inherits = "dev"

[features]
default = ["openssl"]
openssl = ["imap/default"]
ratatui = ["ratatui/default"]
rustls = ["imap/rustls-tls"]
tracing = ["dep:tracing", "dep:tracing-subscriber"]

[dependencies]
anyhow = "=1.0.98"
chrono = "=0.4.41"
clap = { version = "=4.5.42", features = ["derive"] }
imap = { version = "=3.0.0-alpha.15", default-features = false, optional = true }
imap-proto = "=0.16.5"
indicatif = "=0.18.0"
ratatui = { version = "=0.29.0", optional = true }
regex = "=1.11.1"
serde = { version = "=1.0.219", features = ["derive"] }
serde-value = "=0.7.0"
serde_any = { version = "=0.5.0", default-features = false, features = ["json", "toml", "yaml"] }
shell-words = "=1.1.0"
size = { version = "=0.5.0", features = ["serde"] }
strfmt = "=0.2.5"
tracing = { version = "=0.1.41", features = ["log"], optional = true }
tracing-subscriber = { version = "=0.3.19", features = ["env-filter"], optional = true }

[dev-dependencies]
tempfile = "=3.20.0"

[lints.clippy]
# https://github.com/rust-lang/rust-clippy/issues/11916
# self_named_module_files = "warn"
allow_attributes_without_reason = "warn"
as_ptr_cast_mut = "warn"
as_underscore = "warn"
assigning_clones = "warn"
borrow_as_ptr = "warn"
branches_sharing_code = "warn"
case_sensitive_file_extension_comparisons = "warn"
cast_lossless = "warn"
cast_possible_truncation = "warn"
create_dir = "warn"
dbg_macro = "warn"
else_if_without_else = "warn"
exit = "deny"
expect_used = "warn"
get_unwrap = "warn"
if_then_some_else_none = "warn"
indexing_slicing = "warn"
infinite_loop = "warn"
integer_division = "warn"
match_like_matches_macro = "warn"
match_same_arms = "warn"
missing_assert_message = "warn"
missing_asserts_for_indexing = "warn"
missing_docs_in_private_items = "warn"
multiple_inherent_impl = "warn"
needless_raw_strings = "warn"
nursery = { level = "warn", priority = -1 }
option_as_ref_deref = "warn"
panic = "deny"
pathbuf_init_then_push = "warn"
pattern_type_mismatch = "warn"
pedantic = { level = "warn", priority = -1 }
print_stderr = "warn"
print_stdout = "warn"
pub_without_shorthand = "deny"
rc_buffer = "warn"
rc_mutex = "warn"
redundant_test_prefix = "warn"
redundant_type_annotations = "warn"
renamed_function_params = "warn"
rest_pat_in_fully_bound_structs = "warn"
return_and_then = "warn"
same_name_method = "warn"
semicolon_if_nothing_returned = "warn"
str_to_string = "warn"
string_slice = "warn"
string_to_string = "warn"
todo = "warn"
try_err = "warn"
unneeded_field_pattern = "warn"
unused_result_ok = "warn"
unused_trait_names = "deny"
unwrap_in_result = "warn"
unwrap_used = "warn"
