-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathCargo.toml
More file actions
222 lines (189 loc) · 5.61 KB
/
Copy pathCargo.toml
File metadata and controls
222 lines (189 loc) · 5.61 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
[package]
name = "depyler-workspace"
version = "4.1.2"
edition = "2021"
description = "Depyler workspace root - formal verification specs and design-by-contract invariants"
license = "MIT OR Apache-2.0"
publish = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
[workspace]
members = [
"crates/depyler-core",
"crates/depyler-analyzer",
"crates/depyler-verify",
"crates/depyler-annotations",
"crates/depyler-quality",
"crates/depyler",
"crates/depyler-ruchy",
"crates/depyler-testing",
"crates/depyler-oracle",
"crates/depyler-corpus",
"crates/depyler-knowledge",
"crates/depyler-graph",
"crates/depyler-hir",
"crates/depyler-lambda",
"crates/depyler-analysis",
"crates/depyler-tooling",
]
exclude = [
"crates/depyler-mcp",
"examples",
"examples/argparse_cli",
"examples/comprehensive_cli",
"examples/test_project",
"examples/test_heterogeneous_dict",
"examples/marco_polo_cli",
]
resolver = "2"
[workspace.metadata.testing]
# Certeza tiered testing configuration
tier1_timeout_ms = 1000 # Sub-second tests
tier2_timeout_ms = 300000 # 5 minutes
tier3_timeout_ms = 14400000 # 4 hours
[workspace.metadata.quality]
max_tdg_score = 2.0
min_coverage = 85.0
max_cyclomatic_complexity = 15
required_documentation_coverage = 100.0
[workspace.package]
version = "4.1.2"
edition = "2021"
authors = ["Depyler Contributors"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/paiml/depyler"
homepage = "https://github.com/paiml/depyler"
documentation = "https://docs.rs/depyler"
description = "A Python-to-Rust transpiler focusing on energy-efficient, safe code generation with progressive verification"
keywords = ["python", "rust", "transpiler", "compiler", "verification"]
categories = ["compilers", "development-tools", "parser-implementations"]
readme = "README.md"
rust-version = "1.83"
[workspace.dependencies]
# Core dependencies
anyhow = "1.0"
thiserror = "1.0"
# Pin serde to version compatible with swc_common (used by pmat)
serde = { version = ">=1.0.200, <1.0.220", features = ["derive"] }
serde_json = "1.0"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# Python parsing (use num-bigint instead of malachite-bigint for lighter builds)
rustpython-parser = { version = "0.4", default-features = false, features = ["location", "num-bigint"] }
rustpython-ast = { version = "0.4", default-features = false, features = ["location", "num-bigint"] }
# Code generation (extra-traits not needed - saves compile time)
syn = { version = "2.0", features = ["full", "visit-mut"] }
quote = "1.0"
proc-macro2 = "1.0"
indexmap = "2.0"
smallvec = { version = "1.0", features = ["serde"] }
regex = "1.10"
# Testing and verification
quickcheck = "1.0"
quickcheck_macros = "1.0"
proptest = "1.0"
insta = "1.0"
tempfile = "3.14"
rand = "0.8"
md5 = "0.7"
# Hash functions
fnv = "1.0.3" # FNV hash for HashMap optimization
# Graph algorithms
petgraph = "0.7"
# CLI
clap = { version = "4.0", features = ["derive", "cargo"] }
indicatif = "0.17"
colored = "2.0"
# Async runtime
tokio = { version = "1.0", features = ["full"] }
# Serialization
toml = "0.8"
[workspace.lints.rust]
unsafe_code = "deny"
unsafe_op_in_unsafe_fn = "warn"
unreachable_pub = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(kani)'] }
[workspace.lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
unwrap_used = "warn"
expect_used = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
default_trait_access = "allow"
similar_names = "allow"
float_cmp = "allow"
large_stack_arrays = "allow"
too_many_lines = "allow"
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = true
panic = "abort"
# CI profile - fast builds, still optimized but no LTO
[profile.ci]
inherits = "release"
lto = "thin" # Much faster than "fat"
codegen-units = 16 # Parallel codegen
strip = false # Skip stripping
# Size-optimized build for distribution
[profile.min-size]
inherits = "release"
opt-level = "z" # Optimize for size
lto = "fat" # Full link-time optimization
codegen-units = 1 # Single codegen unit
panic = "abort" # Remove panic unwinding
strip = true # Strip all symbols
# Fast development builds
[profile.dev-fast]
inherits = "dev"
opt-level = 1
incremental = true
codegen-units = 16
[profile.dev]
panic = "abort"
opt-level = 0
debug = true
incremental = true
# Test profile: opt-level=1 prevents 200+ minute debug-mode test runs (GH-246)
# 27K tests in depyler-core are compute-heavy; opt-level=0 causes 3470% CPU for hours
[profile.test]
inherits = "dev"
opt-level = 1
[profile.bench]
inherits = "release"
debug = true # Keep debug info for profiling
strip = false # Keep symbols for flamegraphs
# Optimize dependencies in all profiles
[profile.release.package."*"]
opt-level = 3
[profile.min-size.package."*"]
opt-level = "z"
[profile.dev-fast.package."*"]
opt-level = 1
# No patches - using crates.io versions for all dependencies
[package.metadata.release]
shared-version = true
[[package.metadata.release.pre-release-replacements]]
file = "CHANGELOG.md"
search = "## \\[Unreleased\\]"
replace = "## [{{version}}] - {{date}}"
[[bench]]
name = "binary_size"
harness = false
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--generate-link-to-definition"]
[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
[lints]
workspace = true
[features]
default = ["full"]
full = []
minimal = []