-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
320 lines (302 loc) · 9.88 KB
/
Cargo.toml
File metadata and controls
320 lines (302 loc) · 9.88 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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
[workspace]
members = [
"kilnd",
"kiln-sync",
"kiln-error",
"kiln-format",
"kiln-foundation",
"kiln-decoder",
"kiln-debug",
"kiln-component",
"kiln-math",
"kiln-host",
"kiln-logging",
"kiln-runtime",
"kiln-instructions",
"kiln-intercept",
"kiln-platform",
"kiln-panic",
"kiln-build-core",
"kiln-builtins",
"cargo-kiln"]
exclude = ["examples/wasi-nn/inference_module"]
resolver = "2" # Use edition 2021 resolver
[workspace.package]
authors = ["The Kiln Project Developers"]
edition = "2024"
rust-version = "1.85.0"
license = "MIT"
repository = "https://github.com/pulseengine/kiln"
version = "0.2.0" # Updated to 0.2.0 for consistency
[workspace.dependencies]
anyhow = "1.0"
wit-bindgen = "0.41.0"
# Internal crate versions
kiln-error = { path = "kiln-error", version = "0.2.0", default-features = false }
kiln-sync = { path = "kiln-sync", version = "0.2.0", default-features = false }
kiln-format = { path = "kiln-format", version = "0.2.0", default-features = false }
kiln-foundation = { path = "kiln-foundation", version = "0.2.0", default-features = false }
kiln-decoder = { path = "kiln-decoder", version = "0.2.0", default-features = false, features = ["std"] }
kiln-debug = { path = "kiln-debug", version = "0.2.0", default-features = false }
kiln-runtime = { path = "kiln-runtime", version = "0.2.0", default-features = false }
kiln-logging = { path = "kiln-logging", version = "0.2.0", default-features = false }
kiln-instructions = { path = "kiln-instructions", version = "0.2.0", default-features = false }
kiln-component = { path = "kiln-component", version = "0.2.0", default-features = false }
kiln-host = { path = "kiln-host", version = "0.2.0", default-features = false }
kiln-intercept = { path = "kiln-intercept", version = "0.2.0", default-features = false }
kiln-math = { path = "kiln-math", version = "0.2.0", default-features = false }
kiln-platform = { path = "kiln-platform", version = "0.2.0", default-features = false }
kiln-panic = { path = "kiln-panic", version = "0.2.0", default-features = false }
kiln-wasi = { path = "kiln-wasi", version = "0.2.0", default-features = false }
# Note: Safety level presets should be defined in individual crate Cargo.toml files
# as workspace.features is not supported by Cargo
[workspace.lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(test)'] }
deprecated = "allow"
useless_ptr_null_checks = "allow"
let_underscore_drop = "allow"
unused_imports = "allow"
unused_variables = "allow"
unused_mut = "allow"
unused_macros = "allow"
unused_assignments = "allow"
missing_docs = "allow"
dead_code = "allow"
unreachable_patterns = "allow"
[workspace.lints.clippy]
# Static memory enforcement - relaxed for CI stability
# std_instead_of_core = "deny" - disabled for CI
# std_instead_of_alloc = "deny" - disabled for CI
std_instead_of_core = "allow"
std_instead_of_alloc = "allow"
# Allow warnings that would require substantial refactoring
needless_continue = "allow"
if_not_else = "allow"
needless_pass_by_value = "allow"
manual_let_else = "allow"
elidable_lifetime_names = "allow"
unused_self = "allow"
ptr_as_ptr = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_sign_loss = "allow"
unreadable_literal = "allow"
too_many_lines = "allow"
similar_names = "allow"
module_name_repetitions = "allow"
inline_always = "allow"
multiple_crate_versions = "allow"
semicolon_if_nothing_returned = "allow"
comparison_chain = "allow"
ignored_unit_patterns = "allow"
single_match_else = "allow"
needless_range_loop = "allow"
explicit_iter_loop = "allow"
bool_to_int_with_if = "allow"
match_same_arms = "allow"
match_like_matches_macro = "allow"
result_unit_err = "allow"
uninlined_format_args = "allow"
large_enum_variant = "allow"
must_use_candidate = "allow"
new_without_default = "allow"
used_underscore_binding = "allow"
wildcard_in_or_patterns = "allow"
map_unwrap_or = "allow"
ref_option = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
return_self_not_must_use = "allow"
too_many_arguments = "allow"
struct_excessive_bools = "allow"
type_complexity = "allow"
needless_borrow = "allow"
default_trait_access = "allow"
init_numbered_fields = "allow"
field_reassign_with_default = "allow"
op_ref = "allow"
should_implement_trait = "allow"
match_wildcard_for_single_variants = "allow"
reserve_after_initialization = "allow"
needless_late_init = "allow"
empty_line_after_doc_comments = "allow"
int_plus_one = "allow"
extra_unused_lifetimes = "allow"
unnecessary_cast = "allow"
manual_range_contains = "allow"
single_match = "allow"
question_mark = "allow"
collapsible_if = "allow"
redundant_closure = "allow"
iter_nth = "allow"
clone_on_copy = "allow"
map_identity = "allow"
range_plus_one = "allow"
arc_with_non_send_sync = "allow"
collapsible_match = "allow"
explicit_auto_deref = "allow"
useless_conversion = "allow"
or_fun_call = "allow"
manual_ok_or = "allow"
explicit_counter_loop = "allow"
unwrap_or_default = "allow"
get_first = "allow"
range_minus_one = "allow"
# pedantic group removed to avoid priority conflicts with individual lints
# Warn about allocations that could be bounded
vec_init_then_push = "allow"
redundant_pattern_matching = "allow"
let_unit_value = "allow"
derivable_impls = "allow"
only_used_in_recursion = "allow"
borrowed_box = "allow"
needless_return = "allow"
ptr_arg = "allow"
manual_div_ceil = "allow"
filter_map_identity = "allow"
map_clone = "allow"
option_if_let_else = "allow"
never_loop = "allow"
trivially_copy_pass_by_ref = "allow"
overly_complex_bool_expr = "allow"
nonminimal_bool = "allow"
unnested_or_patterns = "allow"
inefficient_to_string = "allow"
manual_filter_map = "allow"
module_inception = "allow"
missing_const_for_thread_local = "allow"
eq_op = "allow"
doc_markdown = "allow"
unwrap_used = "allow"
option_as_ref_deref = "allow"
slow_vector_initialization = "allow"
non_minimal_cfg = "allow"
manual_contains = "allow"
unnecessary_lazy_evaluations = "allow"
unnecessary_filter_map = "allow"
doc_lazy_continuation = "allow"
cloned_ref_to_slice_refs = "allow"
unnecessary_unwrap = "allow"
non_canonical_clone_impl = "allow"
if_same_then_else = "allow"
manual_strip = "allow"
collapsible_else_if = "allow"
let_and_return = "allow"
unnecessary_to_owned = "allow"
useless_format = "allow"
manual_range_patterns = "allow"
unnecessary_map_or = "allow"
assigning_clones = "allow"
manual_inspect = "allow"
items_after_statements = "allow"
expect_used = "allow"
to_string_in_format_args = "allow"
crate_in_macro_def = "allow"
disallowed_names = "allow"
needless_borrows_for_generic_args = "allow"
single_char_add_str = "allow"
double_must_use = "allow"
single_component_path_imports = "allow"
float_cmp = "allow"
panic = "allow"
useless_vec = "allow"
items_after_test_module = "allow"
unnecessary_literal_unwrap = "allow"
iter_cloned_collect = "allow"
double_comparisons = "allow"
redundant_guards = "allow"
empty_line_after_outer_attr = "allow"
missing_fields_in_debug = "allow"
approx_constant = "allow"
bool_assert_comparison = "allow"
ptr_eq = "allow"
missing_safety_doc = "allow"
extra_unused_type_parameters = "allow"
# Performance and safety
unnecessary_box_returns = "warn"
# Workspace-level profiles inherit by members unless overridden.
# Setting panic=abort for production profiles (dev/release) for safety and deterministic behavior.
# Test and bench profiles intentionally use default panic handling for proper test framework operation.
[profile.dev]
panic = "abort"
# Inherits other settings from Cargo's defaults
[profile.release]
panic = "abort"
strip = true # Reduce binary size
lto = true # Link-Time Optimization
codegen-units = 1 # Maximize optimization opportunities
# Note: panic setting is intentionally omitted for test and bench profiles
# Tests and benchmarks need panic handling for proper error reporting and measurement
[profile.test]
# Inherits other settings from Cargo's defaults (e.g., debug assertions enabled)
# panic setting is not specified - let Rust handle this appropriately for tests
[profile.bench]
# Inherits from release profile by default
# panic setting is not specified - let Rust handle this appropriately for benchmarks
# Workspace-level Kani verification configuration
[workspace.metadata.kani]
# Global Kani settings for safety-critical verification
default-unwind = 5
stubbing-enabled = true
concrete-playbook = "off"
output-format = "terse"
# Enhanced settings for ASIL-C/D compliance
solver = "cadical"
enable-unstable = true
parallel = 4
# Memory safety verification suite
[[workspace.metadata.kani.package]]
name = "kiln-foundation"
verification-enabled = true
harnesses = [
"verify_bounded_collections_memory_safety",
"verify_safe_memory_bounds",
"verify_atomic_memory_operations",
"verify_memory_budget_never_exceeded",
"verify_hierarchical_budget_consistency",
"verify_cross_crate_memory_isolation"
]
# Concurrency safety verification suite
[[workspace.metadata.kani.package]]
name = "kiln-sync"
verification-enabled = true
harnesses = [
"verify_mutex_no_data_races",
"verify_rwlock_concurrent_access",
"verify_atomic_operations_safety"
]
# Type safety verification suite
[[workspace.metadata.kani.package]]
name = "kiln-component"
verification-enabled = true
harnesses = [
"verify_component_type_safety",
"verify_namespace_operations",
"verify_import_export_consistency"
]
# Error handling verification
[[workspace.metadata.kani.package]]
name = "kiln-error"
verification-enabled = true
harnesses = [
"verify_error_creation_safety",
"verify_error_propagation"
]
# Runtime verification suite
[[workspace.metadata.kani.package]]
name = "kiln-runtime"
verification-enabled = true
harnesses = [
"verify_execution_stack_bounds",
"verify_function_call_depth",
"verify_memory_access_bounds"
]
# Platform abstraction verification
[[workspace.metadata.kani.package]]
name = "kiln-platform"
verification-enabled = true
harnesses = [
"verify_platform_memory_operations",
"verify_synchronization_primitives",
"verify_thread_safety"
]