-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
150 lines (139 loc) · 6.16 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
[package]
name = "greeting-svg"
version = "0.2.5-rc.1"
edition = "2021"
authors = ["Hantong Chen"]
license = "MIT"
rust-version = "1.82"
[dependencies]
ammonia = "4.0.0"
anyhow = "1.0.95"
arc-swap = "1.7.1"
axum = { version = "0.7.9", default-features = false, features = ["http1", "http2", "tokio"] }
bytes = "1.9.0"
chrono = { version = "0.4.39", default-features = false, features = ["now", "std", "clock"] }
chrono-tz = "0.10.0"
cidr = { version = "0.3.0", features = ["serde"] }
clap = { version = "4.5.23", features = ["derive"] }
dashmap = { version = "6.1.0", features = ["inline", "rayon"] }
deadpool-sqlite = { version = "0.9.0", optional = true }
fluent-uri = "0.3.2"
foldhash = "0.1.4"
macro-toolset = { version = "0.8.0-rc.2", default-features = false, features = [
"feat-string",
"feat-string-ext-ammonia",
"feat-string-ext-ryu",
] }
miku-server-timing = "0.1.2"
mimalloc = "0.1.43"
rand = "0.8.5"
rayon = "1.10.0"
rusqlite = { version = "0.32.1", optional = true }
serde = { version = "1.0.217", features = ["derive", "rc"] }
serde_json = { version = "1.0.134", features = ["preserve_order"] }
svg = "0.18.0"
tokio = { version = "1.42.0", features = ["macros", "net", "parking_lot", "rt-multi-thread", "signal", "time"] }
tower-http = { version = "0.6.2", features = [
"compression-deflate",
"compression-gzip",
"compression-br",
"compression-zstd",
] }
tracing = "0.1.41"
tracing-subscriber = { version = "0.3.19", features = ["env-filter", "parking_lot"] }
[target."cfg(unix)".dependencies]
hyper = { version = "1.5.2", default-features = false, features = ["http1", "server"] }
hyper-util = { version = "0.1.10", features = ["tokio", "server-auto", "http1"] }
tower-service = "0.3.3"
[build-dependencies]
anyhow = "1.0.95"
chrono = { version = "0.4.39", default-features = false, features = ["clock"] }
imagesize = "0.13.0"
macro-toolset = { version = "0.7.13", default-features = false, features = ["feat-string", "feat-string-ext-base64"] }
[profile.release]
opt-level = 3
lto = true
strip = true
codegen-units = 1
panic = "unwind"
[features]
default = ["sqlite-bundled"]
# Store data in SQLite database
sqlite = ["dep:deadpool-sqlite", "dep:rusqlite"]
sqlite-bundled = ["sqlite", "rusqlite/bundled"] # For windows
# === Lints config ===
[lints.rust]
unsafe_code = "warn"
missing_docs = "warn"
missing_debug_implementations = "warn"
unreachable_pub = "warn"
# Only works in nightly channel, use `cargo +nightly clippy --fix --allow-dirty --allow-staged`
[lints.clippy]
# See: https://rust-lang.github.io/rust-clippy/master/index.html for more details.
# Checks for attributes that allow lints without a reason.
allow_attributes_without_reason = "warn"
# Checks for `assert!(r.is_ok())` or `assert!(r.is_err())` calls, just `unwrap()` instead.
assertions_on_result_states = "warn"
# Checks for code like `foo = bar.clone()`; use `Clone::clone_from()` instead.
assigning_clones = "warn"
# Instead of using an if statement to convert a bool to an int, this lint suggests using a from() function or an as coercion.
bool_to_int_with_if = "warn"
# Checks for methods with high cognitive complexity.
cognitive_complexity = "warn"
# Checks usage of std::fs::create_dir and suggest using std::fs::create_dir_all instead.
create_dir = "warn"
# Checks for usage of the dbg! macro.
dbg_macro = "warn"
# Checks for function/method calls with a mutable parameter in debug_assert!, debug_assert_eq! and debug_assert_ne! macros.
# Mutating something in a debug_assert! macro results in different behavior between a release and debug build.
debug_assert_with_mut_call = "warn"
# Checks for literal calls to `Default::default()`. Use `$type::default()` instead.
default_trait_access = "warn"
# Checks for types that derive PartialEq and could implement Eq.
# derive_partial_eq_without_eq = "warn"
# Checks for usage of unicode scripts other than those explicitly allowed by the lint config.
disallowed_script_idents = "deny"
# Detects the syntax ['foo'] in documentation comments (notice quotes instead of backticks) outside of code blocks
doc_link_with_quotes = "warn"
# Checks for the presence of _, :: or camel-case words outside ticks in documentation.
doc_markdown = "warn"
# Checks for usage of if expressions with an else if branch, but without a final else branch.
else_if_without_else = "deny"
# Checks for use Enum::*.
enum_glob_use = "warn"
# is_file doesn’t cover special file types in unix-like systems, and doesn’t cover symlink in windows.
# Using !FileType::is_dir() is a better way
filetype_is_file = "warn"
# Checks for usage of .to_string() on an &&T where T implements ToString directly (like &&str or &&String).
inefficient_to_string = "warn"
# Checks for usage of std::mem::forget(t) where t is Drop or has a field that implements Drop.
mem_forget = "warn"
# Checks the doc comments of publicly visible functions that return a Result type and warns if there is no # Errors section.
# missing_errors_doc = "warn"
# Checks the doc comments of publicly visible functions that may panic and warns if there is no # Panics section.
missing_panics_doc = "warn"
# Checks that module layout uses only self named module files; bans mod.rs files.
mod_module_files = "deny"
# Checks for multiple inherent implementations of a struct
multiple_inherent_impl = "warn"
# Checks for usage of Mutex<X> where an atomic will do.
mutex_atomic = "warn"
# Checks for usage of Mutex<X> where X is an integral type. Use Atomic instead.
mutex_integer = "warn"
# The lint checks for if-statements appearing in loops that contain a continue statement in either their main blocks or their else-blocks,
# when omitting the else-block possibly with some rearrangement of code can make the code easier to understand.
needless_continue = "warn"
# Checks for usage of panic!.
panic = "warn"
# Checks for temporaries returned from function calls in a match scrutinee that have the clippy::has_significant_drop attribute.
significant_drop_in_scrutinee = "warn"
# Checks for usage of todo!.
todo = "warn"
# Checks for usage of unimplemented!.
unimplemented = "warn"
# Checks for usage of unreachable!.
unreachable = "warn"
# Checks for wildcard dependencies in the Cargo.toml.
wildcard_dependencies = "deny"
# Checks for wildcard imports use _::*
wildcard_imports = "warn"