Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
199 lines (176 loc) · 6.33 KB
/
Copy pathCargo.toml
File metadata and controls
199 lines (176 loc) · 6.33 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
[workspace]
resolver = "3"
members = ["crates/*"]
exclude = ["fuzz"]
[workspace.package]
version = "0.0.1"
edition = "2024"
rust-version = "1.97"
license = "GPL-3.0-or-later"
publish = false
[workspace.dependencies]
# Internal crates (see docs/PLAN.md, crate map). Add a line when a crate is created.
bk-core = { path = "crates/bk-core" }
bk-marshal = { path = "crates/bk-marshal" }
bk-pcode = { path = "crates/bk-pcode" }
bk-sleigh-syntax = { path = "crates/bk-sleigh-syntax" }
bk-lang = { path = "crates/bk-lang" }
bk-bin = { path = "crates/bk-bin" }
bk-elf = { path = "crates/bk-elf" }
bk-testkit = { path = "crates/bk-testkit" }
bk-binutils-sys = { path = "crates/bk-binutils-sys" }
bk-gnu-disasm = { path = "crates/bk-gnu-disasm" }
bk-ui = { path = "crates/bk-ui" }
bk-sla = { path = "crates/bk-sla" }
bk-decomp-types = { path = "crates/bk-decomp-types" }
bk-sleigh = { path = "crates/bk-sleigh" }
bk-sleigh-compiler = { path = "crates/bk-sleigh-compiler" }
bk-cspec = { path = "crates/bk-cspec" }
bk-sleigh-snippet = { path = "crates/bk-sleigh-snippet" }
bk-decomp-range = { path = "crates/bk-decomp-range" }
bk-decomp-cfg = { path = "crates/bk-decomp-cfg" }
bk-context = { path = "crates/bk-context" }
bk-decomp-ir = { path = "crates/bk-decomp-ir" }
bk-decomp-symbols = { path = "crates/bk-decomp-symbols" }
# Foundations (exact versions, each at least two weeks old; see docs/LOOP.md)
thiserror = "2.0.21"
tracing = "0.1.44"
bitflags = "2.13.2"
memchr = "2.8.3"
parking_lot = "0.12.5"
roxmltree = "0.21.2"
quick-xml = "0.42.0"
flate2 = { version = "1.1.10", default-features = false, features = ["zlib-rs"] }
walkdir = "2.5.0"
# Pinned exactly: 0.1.5 was under two weeks old when this was added (2026-11-12).
unicode-properties = { version = "=0.1.4", default-features = false, features = ["general-category"] }
num-bigint = "0.4.8"
primitive-types = { version = "0.14.0", default-features = false, features = ["std"] }
libm = "0.2.16"
wait-timeout = "0.2.1"
# SLEIGH front end (bk-sleigh-syntax; evaluations in docs/features/sleigh-syntax.md)
string-interner = { version = "0.20.0", default-features = false, features = ["std", "backends", "inline-more"] }
rustc-hash = "2.1.3"
# num-bigint is listed under Foundations (shared with bk-pcode).
# User interface (ADR-008; evaluation in docs/features/ui-design.md). Only
# bk-ui and the Basilisk binary depend on these.
egui = { version = "0.36.2", default-features = false }
eframe = { version = "0.36.2", default-features = false, features = ["wgpu", "accesskit", "persistence", "wayland", "x11"] }
egui_extras = { version = "0.36.2", default-features = false }
egui_dock = { version = "0.21.1", features = ["serde"] }
egui-phosphor = { version = "0.14.0", default-features = false, features = ["regular"] }
image = { version = "0.25.10", default-features = false, features = ["png"] }
serde = { version = "1.0.229", features = ["derive"] }
fuzzy-matcher = "0.3.7"
serde_json = "1.0.154"
ron = "0.12.2"
# Build support (bk-binutils-sys compiles the vendored binutils C; ADR-019)
cc = { version = "1.10.0", features = ["parallel"] }
# Test support
proptest = "1.12.0"
rstest = "0.27.0"
insta = "1.49.0"
tempfile = "3.27.0"
object = { version = "0.40.0", default-features = false, features = ["read_core", "elf", "std"] }
# Heap measurement in tests (bk-elf allocation bound; ADR-011 evaluation in docs/agents/bin-elf.md).
dhat = "0.3.3"
# Seeded graph generation in bk-decomp-cfg tests (ADR-011 evaluation in docs/agents/decomp-cfg.md); already in Cargo.lock through proptest.
rand = "0.8.8"
rand_chacha = "0.3.1"
egui_kittest = { version = "0.36.2", features = ["wgpu", "snapshot"] }
[workspace.lints.rust]
# `unsafe` is forbidden everywhere; a crate that truly needs it opts out by
# name under ADR-020 and is then checked with Miri (scripts/miri.sh).
unsafe_code = "forbid"
missing_debug_implementations = "warn"
missing_docs = "warn"
rust_2018_idioms = { level = "warn", priority = -1 }
unreachable_pub = "warn"
unused_lifetimes = "warn"
unused_qualifications = "warn"
unused_macro_rules = "warn"
trivial_numeric_casts = "warn"
redundant_lifetimes = "warn"
unsafe_op_in_unsafe_fn = "deny"
[workspace.lints.rustdoc]
broken_intra_doc_links = "deny"
private_intra_doc_links = "warn"
bare_urls = "warn"
invalid_rust_codeblocks = "warn"
[workspace.lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
# Pedantic lints that fight binary-parsing and compiler-style code more than they help.
module_name_repetitions = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
must_use_candidate = "allow"
cast_possible_truncation = "allow"
cast_sign_loss = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
similar_names = "allow"
too_many_lines = "allow"
struct_excessive_bools = "allow"
# No panics on untrusted input (ADR-009). Tests are exempt through clippy.toml.
indexing_slicing = "warn"
string_slice = "warn"
unwrap_used = "warn"
expect_used = "warn"
get_unwrap = "warn"
panic = "warn"
todo = "warn"
unimplemented = "warn"
exit = "warn"
mem_forget = "warn"
# Unsafe code, where a crate is allowed any (ADR-020).
undocumented_unsafe_blocks = "warn"
multiple_unsafe_ops_per_block = "warn"
# Output goes through `tracing`, not the console.
dbg_macro = "warn"
print_stdout = "warn"
print_stderr = "warn"
# A suppressed lint says why, and stops compiling once it is no longer needed.
allow_attributes = "warn"
allow_attributes_without_reason = "warn"
# Performance and data layout (ADR-012).
clone_on_ref_ptr = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
needless_collect = "warn"
or_fun_call = "warn"
iter_with_drain = "warn"
verbose_file_reads = "warn"
# Clarity and correctness.
use_self = "warn"
if_then_some_else_none = "warn"
map_err_ignore = "warn"
unused_result_ok = "warn"
float_cmp_const = "warn"
lossy_float_literal = "warn"
same_name_method = "warn"
rest_pat_in_fully_bound_structs = "warn"
tests_outside_test_module = "warn"
debug_assert_with_mut_call = "warn"
wildcard_dependencies = "warn"
[profile.dev]
# SLEIGH decoding and the decompiler are painfully slow unoptimised; keep
# debug info but optimise.
opt-level = 1
[profile.dev.package."*"]
opt-level = 3
[profile.test]
opt-level = 1
[profile.release]
lto = "thin"
codegen-units = 1
debug = "line-tables-only"
[profile.dist]
inherits = "release"
opt-level = 3
lto = "fat"
codegen-units = 1
debug = false
strip = "symbols"
[profile.bench]
inherits = "release"