-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCargo.toml
More file actions
202 lines (163 loc) · 6.54 KB
/
Copy pathCargo.toml
File metadata and controls
202 lines (163 loc) · 6.54 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
[workspace]
members = ["crates/*"]
resolver = "2"
# =============================================================================
# WORKSPACE METADATA — shared across all member crates
# =============================================================================
[workspace.package]
version = "0.25.1"
edition = "2021"
license = "MIT"
repository = "https://github.com/thelarkinn/aipm"
keywords = ["ai", "plugin", "package-manager", "mcp", "skills"]
categories = ["command-line-utilities", "development-tools"]
readme = "README.md"
# =============================================================================
# WORKSPACE DEPENDENCIES — version pins shared across all member crates
# Members reference these via: dep = { workspace = true }
# =============================================================================
[workspace.dependencies]
# Shared library
libaipm = { path = "crates/libaipm", version = "0.25.1" }
libaipm-engine-spec = { path = "crates/libaipm-engine-spec", version = "0.25.1" }
# Engine API schema source-of-truth (build-time codegen + runtime tables)
phf = "0.13"
phf_codegen = "0.13"
schemars = "1"
jsonschema = "0.46"
prettyplease = "0.2"
bitflags = "2"
# CLI
clap = { version = "4", features = ["derive"] }
inquire = { version = "0.9", default-features = false, features = ["crossterm", "one-liners"] }
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
toml = "0.8"
toml_edit = "0.22"
# Semver
semver = { version = "1", features = ["serde"] }
# HTTP -- synchronous-only client; no async runtime overhead
ureq = { version = "3", default-features = true }
# Git — HTTPS only; SSH features removed to avoid libssh2-sys C compilation (~8.7s)
git2 = { version = "0.19", default-features = false, features = ["https"] }
# Hashing
sha2 = "0.10"
# Error handling
thiserror = "2"
# File locking
fs2 = "0.4"
# Compression
flate2 = "1"
tar = "0.4"
# Filesystem (Windows junctions)
junction = "1"
# Async runtime (used by aipm lsp subcommand only)
tokio = { version = "1", default-features = false, features = ["rt-multi-thread", "macros", "io-std", "sync", "time"] }
# Language Server Protocol
tower-lsp = { version = "0.20", features = [] }
# Recursive directory walking (gitignore-aware)
ignore = "0.4"
# Glob pattern matching (workspace member discovery)
glob = "0.3"
# Data-parallel iteration
rayon = "1"
# Diagnostic rendering (lint display UX)
annotate-snippets = "0.11"
anstyle = "1"
anstyle-query = "1"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
tracing-appender = "0.2"
clap-verbosity-flag = { version = "3", default-features = false, features = ["tracing"] }
# Testing
cucumber = "0.21"
futures = "0.3"
assert_cmd = "2"
predicates = "3"
tempfile = "3"
insta = "1"
# =============================================================================
# WORKSPACE LINTS — Strictest Clippy + Rustc configuration
# Modeled after rust-lang/rust. Applied workspace-wide so all member crates
# inherit these via [lints] workspace = true.
#
# Groups use priority = -1 so individual overrides (priority 0) take precedence.
# =============================================================================
[workspace.lints.rust]
unsafe_code = "forbid"
[workspace.lints.clippy]
# Lint groups ---------------------------------------------------------------
# "deny" = compiler error, but derive macros (serde, thiserror) can override
# via their internal #[allow] attributes. "forbid" would block derive macros.
all = { level = "deny", priority = -1 }
pedantic = { level = "deny", priority = -1 }
nursery = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }
perf = { level = "deny", priority = -1 }
# ANTI-BYPASS: warn on #[allow(...)] attributes in hand-written code.
# Using "warn" so derive macros and integration test files can use #[allow].
# Production code should never add #[allow] — the CI `-D warnings` flag catches it.
allow_attributes = "warn"
# Pedantic allows (legitimate exceptions — these are the ONLY relaxations) ---
module_name_repetitions = "deny"
must_use_candidate = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
items_after_statements = "warn"
no_effect_underscore_binding = "warn"
cast_precision_loss = "warn"
cast_possible_truncation = "warn"
cast_sign_loss = "warn"
cast_lossless = "warn"
default_trait_access = "warn"
struct_excessive_bools = "warn"
doc_markdown = "warn"
# Cargo lint relaxation — transitive deps we don't control
multiple_crate_versions = "allow"
# Cherry-picked restriction lints (never enable the whole group) -------------
# Using "deny" instead of "forbid" so derive macros (clap, serde) can work.
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
dbg_macro = "deny"
todo = "deny"
print_stdout = "deny"
print_stderr = "deny"
undocumented_unsafe_blocks = "deny"
indexing_slicing = "warn"
unwrap_in_result = "deny"
clone_on_ref_ptr = "warn"
create_dir = "warn"
exit = "deny"
# =============================================================================
# DEV PROFILE — faster incremental builds for local development
# =============================================================================
[profile.dev]
opt-level = 0
debug = 1 # line tables only — sufficient for backtraces, faster than full symbols
split-debuginfo = "unpacked" # faster linking on Linux
# Compile all third-party crates at opt-level 1 so C-heavy deps (libgit2,
# ring, etc.) cache better after the first build and link faster.
[profile.dev.package."*"]
opt-level = 1
# Keep all workspace crates in fast, zero-opt debug mode.
[profile.dev.package.libaipm]
opt-level = 0
[profile.dev.package.aipm]
opt-level = 0
# =============================================================================
# RELEASE PROFILE — optimized for distribution binaries
# =============================================================================
[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 1
strip = "symbols"
# =============================================================================
# DIST PROFILE — used by cargo-dist for distribution builds
# Inherits all settings from [profile.release] above
# =============================================================================
[profile.dist]
inherits = "release"