This repository was archived by the owner on Apr 13, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
241 lines (216 loc) · 7.32 KB
/
Cargo.toml
File metadata and controls
241 lines (216 loc) · 7.32 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
[package]
name = "ruley"
version = "1.0.0"
edition = "2024"
authors = ["UncleSp1d3r <unclesp1d3r@evilbitlabs.io>"]
license = "Apache-2.0"
description = "Make your codebase ruley - generate AI IDE rules from codebases"
repository = "https://github.com/EvilBit-Labs/ruley"
homepage = "https://github.com/EvilBit-Labs/ruley"
keywords = ["ai", "llm", "cursor", "claude", "copilot", "ide", "rules"]
categories = ["command-line-utilities", "development-tools"]
rust-version = "1.91"
[workspace.lints.clippy]
# Pedantic clippy configuration with proper priorities
correctness = { level = "deny", priority = -1 }
suspicious = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }
# Security-focused linting
as_conversions = "warn"
as_ptr_cast_mut = "warn"
cast_ptr_alignment = "warn"
float_cmp = "warn"
indexing_slicing = "warn"
arithmetic_side_effects = "warn"
integer_division = "warn"
modulo_arithmetic = "warn"
expect_used = "warn"
# Security anti-patterns
# allow_attributes = "warn" # I think we need them for test and benchmarks
dbg_macro = "warn"
print_stdout = "warn" # Allowed per-use only with a specific annotation and justification
# print_stderr = "warn"
todo = "warn"
unimplemented = "warn"
unreachable = "warn"
panic = "deny" # DON'T PANIC IN PRODUCTION (it would be forbidden, but it breaks clap for some reason, so just don't do it)
unwrap_used = "deny" # DON'T UNWRAP IN PRODUCTION
exhaustive_enums = "warn"
# Performance and correctness
perf = { level = "warn", priority = -1 }
await_holding_lock = "deny"
clone_on_ref_ptr = "warn"
create_dir = "warn"
exit = "warn"
filetype_is_file = "warn"
float_equality_without_abs = "warn"
if_then_some_else_none = "warn"
# invalid_from_utf8_unchecked = "warn" # Not available in clippy
large_stack_arrays = "warn"
let_underscore_must_use = "warn"
lossy_float_literal = "warn"
map_err_ignore = "warn"
match_same_arms = "warn"
missing_assert_message = "warn"
missing_docs_in_private_items = "allow"
mixed_read_write_in_expression = "warn"
mutex_atomic = "warn"
mutex_integer = "warn"
non_ascii_literal = "warn"
non_send_fields_in_send_ty = "warn"
partial_pub_fields = "warn"
pattern_type_mismatch = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
redundant_type_annotations = "warn"
ref_binding_to_reference = "warn"
same_name_method = "warn"
self_named_module_files = "warn"
semicolon_inside_block = "warn"
semicolon_outside_block = "warn"
shadow_reuse = "warn"
shadow_same = "warn"
shadow_unrelated = "warn"
str_to_string = "warn"
string_add = "warn"
string_add_assign = "warn"
string_lit_as_bytes = "warn"
string_slice = "warn"
suspicious_operation_groupings = "warn"
trailing_empty_array = "warn"
transmute_undefined_repr = "warn"
trivial_regex = "warn"
undocumented_unsafe_blocks = "deny" # We should not have unsafe code in this project, but if we do, we should document it
unnecessary_self_imports = "warn"
unseparated_literal_suffix = "warn"
unused_async = "warn"
unused_peekable = "warn"
unused_rounding = "warn"
use_debug = "warn"
verbose_file_reads = "warn"
wildcard_enum_match_arm = "warn"
zero_sized_map_values = "warn"
# Allow specific lints that are too noisy for this project; each of these will get set to warn/deny at some point
missing_errors_doc = "allow"
missing_panics_doc = "allow" # TODO: Revisit this
must_use_candidate = "allow" # TODO: Revisit this
cast_possible_truncation = "allow" # TODO: Revisit this
cast_precision_loss = "allow" # TODO: Revisit this
cast_sign_loss = "allow" # TODO: Revisit this
module_name_repetitions = "allow" # TODO: Revisit this
similar_names = "allow" # TODO: Revisit this
too_many_lines = "allow" # TODO: Revisit this
type_complexity = "allow" # TODO: Revisit this
async_yields_async = "allow" # TODO: Revisit this
large_futures = "allow" # TODO: Revisit this
result_large_err = "allow" # TODO: Revisit this
cargo_common_metadata = "allow" # TODO: Revisit this
multiple_crate_versions = "allow"
[features]
default = ["anthropic", "openai", "compression-typescript"]
# LLM Providers
anthropic = []
openai = []
ollama = []
openrouter = []
xai = []
groq = []
gemini = []
all-providers = [
"anthropic",
"openai",
"ollama",
"openrouter",
"xai",
"groq",
"gemini",
]
# Compression languages
compression-typescript = ["tree-sitter-typescript"]
compression-python = ["tree-sitter-python"]
compression-rust = ["tree-sitter-rust"]
compression-go = ["tree-sitter-go"]
compression-all = [
"compression-typescript",
"compression-python",
"compression-rust",
"compression-go",
]
[dependencies]
anyhow = "1.0.102"
async-trait = "0.1.89"
chrono = { version = "0.4.44", features = [ "serde" ] }
# CLI
clap = { version = "4.6.0", features = [ "derive", "env" ] }
# Configuration
config = { version = "0.15.22", features = [ "toml" ] }
console = "0.16.3"
dialoguer = "0.12.0"
# Misc
dirs = "6.0.0"
# Git operations
git2 = "0.20.4"
globset = "0.4.18"
# File matching
ignore = "0.4.25"
# Progress display
indicatif = "0.18.4"
quick-xml = "0.39.2"
regex = "1.12.3"
# LLM providers (feature-gated)
# Alternative: individual provider SDKs
reqwest = { version = "0.13.2", features = [ "json", "stream" ] }
# Serialization
serde = { version = "1.0.228", features = [ "derive" ] }
serde_json = "1.0.149"
# Error handling
thiserror = "2.0.18"
# Token counting
tiktoken-rs = "0.11.0"
# Async runtime
tokio = { version = "1.51.1", features = [ "full" ] }
toml = "1.0.7"
# Logging
tracing = "0.1.44"
tracing-subscriber = { version = "0.3.23", features = [ "env-filter" ] }
# Tree-sitter (feature-gated per language)
# ABI Version Compatibility:
# - tree-sitter 0.26.x supports ABI versions 13-15 (backwards-compatible, not forwards-compatible)
# - The core library can use parsers with older ABI versions, but not newer ones
# - All language parsers should ideally use the same ABI version to avoid potential issues
#
# Current Status (MIXED ABI VERSIONS):
# - tree-sitter 0.26.3: ABI v15 (latest) ✓
# - tree-sitter-go 0.25.0: ABI v15 ✓ (latest available)
# - tree-sitter-python 0.25.0: ABI v15 ✓ (latest available)
# - tree-sitter-rust 0.24.0: ABI v15 ✓ (latest available)
# - tree-sitter-typescript 0.23.2: ABI v14 ⚠️ (latest available, compatible but older ABI)
#
# Note: Language parsers haven't released 0.26.x versions yet, but they're compatible
# with tree-sitter 0.26.3 due to backward compatibility support.
tree-sitter = "0.26.8"
tree-sitter-go = { version = "0.25.0", optional = true }
tree-sitter-python = { version = "0.25.0", optional = true }
tree-sitter-rust = { version = "0.24.2", optional = true }
tree-sitter-typescript = { version = "0.23.2", optional = true }
[dev-dependencies]
criterion = { version = "0.8.2", features = [ "html_reports" ] }
git-cliff = "2.12.0"
insta = "1.47.2"
mockito = "1.7.2"
tempfile = "3.27.0"
typos = "0.10.42"
[[bench]]
name = "benchmark"
harness = false
[lints.rust]
# Use "deny" instead of "forbid" to allow `#[allow(unsafe_code)]` in tests
# that need to use `std::env::set_var` (unsafe in Rust 2024 edition due to data races)
unsafe_code = "deny"
[profile.release]
lto = true
codegen-units = 1
panic = "abort"
strip = true