-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
192 lines (182 loc) · 5.62 KB
/
Cargo.toml
File metadata and controls
192 lines (182 loc) · 5.62 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
#:tombi schema.strict = false
# SPDX-FileCopyrightText: 2025 Knitli Inc. <knitli@knit.li>
# SPDX-FileContributor: Adam Poulemanos <adam@knit.li>
#
# SPDX-License-Identifier: MIT OR Apache-2.0
# =========================================================
# * THREAD - Workspace
# =========================================================
[workspace]
resolver = "3"
members = [
"crates/ast-engine",
"crates/flow",
"crates/language",
"crates/rule-engine",
"crates/services",
"crates/thread",
"crates/utils",
"crates/wasm",
"xtask",
]
[workspace.package]
version = "0.1.0"
edition = "2024"
rust-version = "1.89"
description = "A safe, fast, flexible code analysis engine built in Rust. Service-library dual architecture with AST pattern matching, 26-language support, content-addressed caching, and incremental intelligence via ReCoco dataflow."
documentation = "https://docs.rs/thread"
readme = "README.md"
homepage = "https://knitli.com"
repository = "https://github.com/knitli/thread"
license = "AGPL-3.0-or-later"
keywords = [
"code-analysis",
"parsing",
"repository-tools",
"static-analysis",
"tree-sitter",
]
categories = [
"artificial-intelligence",
"command-line-utilities",
"development-tools",
"parser-implementations",
"text-processing"
]
include = [
"CHANGELOG.md",
"CONTRIBUTING.md",
"CONTRIBUTORS_LICENSE_AGREEMENT.md",
"LICENSE.md",
"README.md",
"VENDORED.md",
"examples/**",
"sbom.spdx",
"src/**",
"tests/**",
]
# tombi: format.rules.table-keys-order.disabled = true
[workspace.dependencies]
# ludicrous speed!
aho-corasick = { version = "1.1.4" }
bit-set = { version = "0.8.0" }
memchr = { version = "2.7.6", features = ["std"] }
rapidhash = { version = "4.2.1" }
regex = { version = "1.12.2" }
simdeez = { version = "2.0.0" }
# speed, but parallelism for local deployment
rayon = { version = "1.11.0" }
# ast
tree-sitter = { version = ">=0.25.0" }
# async -- primarily for edge deployment
async-trait = { version = "0.1.89" }
futures = { version = "0.3.31" }
pin-project = { version = "1.1.10" }
mimalloc = { version = "0.1.48", features = ["v3"] }
tokio = { version = "1.49", features = ["full"] }
# zero-cost macros
cfg-if = { version = "1.0.4" }
macro_rules_attribute = { version = "0.2.2" }
# respecting gitignore
ignore = { version = "0.4.25" }
# string interning and lightweight types
lasso = { version = "0.7.3" }
smallvec = { version = "1.15.1" }
smol_str = { version = "0.3.5" }
# serialization
schemars = { version = "1.2.0" }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = { version = "1.0.149" }
serde_yaml = { package = "serde_yml", version = "0.0.12" }
thiserror = { version = "2.0.17" }
# Thread
thread-ast-engine = { path = "crates/ast-engine", version = "0.1.0", default-features = false }
thread = { path = "crates/thread", version = "0.1.0", default-features = false }
thread-flow = { path = "crates/flow", version = "0.1.0", default-features = false }
thread-language = { path = "crates/language", version = "0.1.0", default-features = false }
thread-rule-engine = { path = "crates/rule-engine", version = "0.1.0", default-features = false }
thread-services = { path = "crates/services", version = "0.1.0", default-features = false }
thread-utilities = { path = "crates/utils", version = "0.1.3", default-features = false }
thread-wasm = { path = "crates/wasm", version = "0.0.1", default-features = false }
[workspace.lints.clippy]
# Same lints as tree-sitter itself.
# Lints we allow because they either:
#
# 1. Contain false positives,
# 2. Are unnecessary, or
# 3. Worsen the code
branches_sharing_code = "allow"
cargo = { level = "warn", priority = -1 }
cast_lossless = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
checked_conversions = "allow"
cognitive_complexity = "warn"
collection_is_never_read = "allow"
dbg_macro = "deny"
fallible_impl_from = "allow"
fn_params_excessive_bools = "allow"
if_not_else = "allow"
inline_always = "allow"
items_after_statements = "allow"
match_wildcard_for_single_variants = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
multiple_crate_versions = "allow"
# The "no-enabled-langs" feature in thread-language is intentionally negative
# It's used for builds where no tree-sitter parsers should be compiled (e.g., WASM)
negative_feature_names = "allow"
nursery = { level = "warn", priority = -1 }
obfuscated_if_else = "allow"
option_if_let_else = "allow"
or_fun_call = "allow"
pedantic = { level = "warn", priority = -1 }
range_plus_one = "allow"
redundant_clone = "allow"
redundant_closure_for_method_calls = "allow"
ref_option = "allow"
similar_names = "allow"
string_lit_as_bytes = "allow"
struct_excessive_bools = "allow"
struct_field_names = "allow"
todo = "allow"
too_many_lines = "allow"
transmute_undefined_repr = "allow"
unnecessary_wraps = "allow"
unused_self = "allow"
used_underscore_items = "allow"
[profile.dev]
opt-level = 1
debug = true
debug-assertions = true
lto = false
incremental = true
codegen-units = 256 # More codegen units for faster compilation
# Optimize proc-macros even in debug builds
[profile.dev.package."*"]
opt-level = 3
[profile.release]
opt-level = 3 # Maximum optimization
lto = true # Link-time optimization
panic = "abort" # Smaller binary size
incremental = false
codegen-units = 1
[profile.dev-debug]
inherits = "dev"
[profile.release-dev]
inherits = "release"
debug = true
debug-assertions = true
overflow-checks = true
lto = false
incremental = true
codegen-units = 256
[profile.wasm-release]
inherits = "release"
opt-level = "s" # optimize for size in WASM
strip = true
lto = true
incremental = false