Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
142 lines (121 loc) · 3.94 KB
/
Copy pathCargo.toml
File metadata and controls
142 lines (121 loc) · 3.94 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
[package]
name = "cora-code"
version = "0.21.1"
edition = "2024"
description = "CLI-first AI code review — BYOK, diff/scan/branch, pre-commit hooks"
license = "Apache-2.0"
repository = "https://github.com/codecoradev/cora-code"
readme = "README.md"
keywords = ["cli", "code-review", "ai", "git", "pre-commit"]
categories = ["command-line-utilities", "development-tools"]
rust-version = "1.89"
exclude = [
"docs/",
".github/",
"tests/",
"bench/",
"target/",
]
[dependencies]
# CLI
clap = { version = "4", features = ["derive", "env"] }
clap_complete = "4"
# Async runtime (only what we need)
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
# HTTP client (OpenAI-compatible API calls)
reqwest = { version = "0.12", features = ["json", "stream", "rustls-tls"], default-features = false }
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml_ng = "0.10"
# Git operations
git2 = { version = "0.21", default-features = false, features = ["vendored-libgit2"] }
# Terminal output
colored = "3"
indicatif = "0.18"
# File system
dirs = "6"
glob = "0.3"
ignore = "0.4"
# Parallelism (cold-rebuild file parsing)
rayon = "1"
# Error handling
anyhow = "1"
which = "7"
thiserror = "2"
# Config
toml = "0.8"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# Misc
regex = "1"
futures-util = "0.3"
sha2 = "0.10"
chrono = { version = "0.4.44", features = ["serde"] }
# Symbol index (v0.6 — Code Intelligence)
rusqlite = { version = "0.41", features = ["bundled"] }
# Vector search (Phase 3 — Brain Mode)
# Static code embedding model (potion-code-16M-v2); pure-Rust tokenizer, no network
# in the crate itself: the model is fetched by `embed::model_store`.
model2vec-rs = { version = "0.4", default-features = false, features = ["fancy-regex", "local-only"] }
vecq-core = "0.3.0"
fs2 = "0.4"
# Self-update (upgrade command)
flate2 = "1"
tar = "0.4"
# Tree-sitter AST parsing (optional — enable with --features tree-sitter)
tree-sitter = { version = "0.26", optional = true }
tree-sitter-rust = { version = "0.24", optional = true }
tree-sitter-go = { version = "0.25", optional = true }
tree-sitter-python = { version = "0.25", optional = true }
tree-sitter-typescript = { version = "0.23", optional = true }
tree-sitter-java = { version = "0.23", optional = true }
tree-sitter-c = { version = "0.24", optional = true }
tree-sitter-cpp = { version = "0.23", optional = true }
tree-sitter-c-sharp = { version = "0.23", optional = true }
tree-sitter-ruby = { version = "0.23", optional = true }
tree-sitter-php = { version = "0.24", optional = true }
tree-sitter-scala = { version = "0.26", optional = true }
tree-sitter-javascript = { version = "0.25", optional = true }
tempfile = "3"
[features]
default = ["tree-sitter"]
# Compile the code embedding model into the binary (release builds). Needs
# CORA_BUNDLED_MODEL_DIR to name a directory with config.json, tokenizer.json and
# model.safetensors (scripts/fetch-model.sh). Off by default: the model is 33.5 MB
# and the crates.io package limit is 10 MB.
bundled-model = []
tree-sitter = [
"dep:tree-sitter",
"dep:tree-sitter-rust",
"dep:tree-sitter-go",
"dep:tree-sitter-python",
"dep:tree-sitter-typescript",
"dep:tree-sitter-java",
"dep:tree-sitter-c",
"dep:tree-sitter-cpp",
"dep:tree-sitter-c-sharp",
"dep:tree-sitter-ruby",
"dep:tree-sitter-php",
"dep:tree-sitter-scala",
"dep:tree-sitter-javascript",
]
[dev-dependencies]
assert_cmd = "2"
predicates = "3"
tokio-test = "0.4"
[lints.clippy]
# rusqlite 0.41 needs Rust 1.89, which turns on let-chains (stable since 1.88) and
# with them ~56 `collapsible_if` hits in untouched code. Rewriting them is a wide
# mechanical diff, so it is done separately; drop this line with that change.
collapsible_if = "allow"
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true
panic = "abort"
[[bin]]
name = "cora"
path = "src/main.rs"