Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
178 lines (153 loc) · 4.43 KB
/
Copy pathCargo.toml
File metadata and controls
178 lines (153 loc) · 4.43 KB
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
[workspace]
resolver = "2"
members = [
"engine",
"cli",
"bindings/common",
]
exclude = [
"bindings/python",
"bindings/node",
"tests/e2e/repos",
]
[workspace.package]
version = "0.6.3"
edition = "2021"
rust-version = "1.91"
license = "MIT"
repository = "https://github.com/Topos-Labs/infiniloom"
[workspace.dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
anyhow = "1.0"
thiserror = "2.0"
log = "0.4"
# ============================================================================
# Strict Linting Configuration
# ============================================================================
# ============================================================================
# Rust Lints (based on rust-analyzer and tokio best practices)
# ============================================================================
[workspace.lints.rust]
# Lifetime and reference clarity
elided_lifetimes_in_paths = "warn"
explicit_outlives_requirements = "warn"
unused_lifetimes = "warn"
# Safety
unsafe_op_in_unsafe_fn = "warn"
unsafe_code = "warn"
# Visibility and exports
unreachable_pub = "warn"
unused_extern_crates = "warn"
# Future compatibility
future_incompatible = { level = "deny", priority = -1 }
rust_2018_idioms = { level = "warn", priority = -1 }
rust_2021_compatibility = { level = "warn", priority = -1 }
# Code correctness
unused = { level = "warn", priority = -1 }
nonstandard_style = { level = "warn", priority = -1 }
# Explicit
let_underscore_drop = "warn"
meta_variable_misuse = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unused_qualifications = "warn"
# ============================================================================
# Clippy Lints (based on rust-analyzer configuration)
# ============================================================================
[workspace.lints.clippy]
# Lint groups with
9729
proper priorities
correctness = { level = "deny", priority = -1 }
perf = { level = "deny", priority = -1 }
suspicious = { level = "warn", priority = -1 }
complexity = { level = "warn", priority = -1 }
style = { level = "warn", priority = -1 }
restriction = { level = "allow", priority = -1 }
# Specific warnings for debugging/logging hygiene
dbg_macro = "warn"
todo = "warn"
print_stdout = "warn"
print_stderr = "warn"
# Memory safety warnings
rc_buffer = "warn"
rc_mutex = "warn"
clone_on_ref_ptr = "warn"
# String handling
str_to_string = "warn"
# Code quality and best practices
explicit_deref_methods = "warn"
explicit_iter_loop = "warn"
filter_map_next = "warn"
flat_map_option = "warn"
inefficient_to_string = "warn"
manual_ok_or = "warn"
map_flatten = "warn"
map_unwrap_or = "warn"
needless_pass_by_value = "warn"
redundant_clone = "warn"
redundant_pattern_matching = "warn"
single_char_pattern = "warn"
unnecessary_wraps = "warn"
unused_self = "warn"
# Documentation quality
missing_docs_in_private_items = "allow" # Too noisy, but good for libraries
undocumented_unsafe_blocks = "warn"
# Error handling
panic_in_result_fn = "warn"
unwrap_in_result = "warn"
# Allowed lints (common in real-world code)
too_long_first_doc_paragraph = "allow"
single_match = "allow"
result_unit_err = "allow"
len_without_is_empty = "allow"
enum_variant_names = "allow"
new_ret_no_self = "allow"
useless_asref = "allow"
assigning_clones = "allow"
vec_init_then_push = "allow"
literal_string_with_formatting_args = "allow"
unnecessary_map_or = "allow"
too_many_arguments = "allow"
type_complexity = "allow"
wrong_self_convention = "allow"
module_name_repetitions = "allow"
similar_names = "allow"
multiple_crate_versions = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
must_use_candidate = "allow"
doc_markdown = "allow"
items_after_statements = "allow"
redundant_closure_for_method_calls = "allow"
significant_drop_tightening = "allow"
# ============================================================================
# Profile Configuration
# ============================================================================
[profile.dev]
opt-level = 0
debug = true
overflow-checks = true
lto = false
panic = "unwind"
incremental = true
[profile.release]
opt-level = 3
debug = false
overflow-checks = false
lto = "thin"
panic = "abort"
codegen-units = 1
strip = true
[profile.release-with-debug]
inherits = "release"
debug = true
strip = false
[profile.bench]
inherits = "release"
debug = true
# Coverage profile for cargo-llvm-cov
[profile.coverage]
inherits = "dev"
opt-level = 0
debug = true
overflow-checks = true