-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCargo.toml
More file actions
284 lines (275 loc) · 8.76 KB
/
Cargo.toml
File metadata and controls
284 lines (275 loc) · 8.76 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
[workspace]
members = [
"nucleus",
"bin/chainboot",
"bin/chainofcommand",
# Libraries
"libs/boot",
"libs/console",
"libs/cpu",
"libs/driver",
"libs/exception",
"libs/kernel-state",
"libs/local-irq",
"libs/locking",
"libs/log",
"libs/machine",
"libs/memory",
"libs/platform",
"libs/primitives",
"libs/qemu",
"libs/test",
"libs/time",
]
resolver = "2"
[workspace.package]
authors = ["Berkus Decker <berkus+vesper@metta.systems>"]
categories = ["embedded", "no-std", "os"]
documentation = "https://docs.metta.systems/vesper"
edition = "2024"
homepage = "https://github.com/metta-systems/vesper"
license = "BlueOak-1.0.0"
publish = false
readme = "README.md"
repository = "https://github.com/metta-systems/vesper"
version = "0.0.1"
[workspace.dependencies]
#========
# target
#========
aarch64-cpu = { version = "11.2" }
bit_field = { version = "0.10" }
bitflags = { version = "2.10" }
buddy-alloc = { version = "0.6.0", git = "https://github.com/metta-systems/buddy-alloc", branch = "feature/allocator-api" }
cfg-if = { version = "1.0" }
libboot = { path = "libs/boot" }
libconsole = { path = "libs/console" }
libcpu = { path = "libs/cpu" }
libdriver = { path = "libs/driver" }
libexception = { path = "libs/exception" }
libkernel-state = { path = "libs/kernel-state" }
liblocal-irq = { path = "libs/local-irq" }
liblocking = { path = "libs/locking" }
liblog = { path = "libs/log" }
libmachine = { path = "libs/machine" }
libmemory = { path = "libs/memory" }
libplatform = { path = "libs/platform" }
libprimitives = { path = "libs/primitives" }
libqemu = { path = "libs/qemu" }
libtest = { path = "libs/test" }
libtime = { path = "libs/time" }
once_cell = { version = "1.21", default-features = false, features = ["unstable"] }
qemu-exit = { version = "3.0" }
snafu = { version = "0.8", default-features = false, features = ["unstable-core-error"] }
tock-registers = { version = "0.10" }
usize_conversions = { version = "0.2" }
ux = { version = "0.1", default-features = false }
#======
# host
#======
anyhow = { version = "1.0" }
argh = { version = "0.1" }
bytes = { version = "1.11" }
crossterm = { version = "0.29", features = ["event-stream"] }
futures = { version = "0.3" }
futures-util = { version = "0.3", features = ["io"] }
tokio = { version = "1.49", features = ["full"] }
tokio-serial = { version = "5.4" }
tokio-stream = { version = "0.1" }
tokio-util = { version = "0.7", features = ["codec", "io"] }
#=======
# mixed
#=======
seahash = { version = "4.1" }
[patch.crates-io]
serialport = { git = "https://github.com/metta-systems/serialport-rs", branch = "macos-ENOTTY-fix" }
[profile.dev]
# See https://github.com/rust-lang/cargo/issues/7359 about why panic=abort is not working here.
# It is still defined in the target JSON so not stricly necessary to specify it here anyway.
#panic = "abort" # @todo try panic_rtt with feature jlink
opt-level = 's' # otherwise boot code will be mangled
[profile.release]
codegen-units = 1
debug = true
lto = true
opt-level = 's'
panic = "abort"
[profile.release-fast]
codegen-units = 16
inherits = "release"
lto = "thin"
[profile.test]
debug = true
opt-level = 's'
[workspace.lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(board_rpi3)', 'cfg(board_rpi4)'] }
# Enable a batch of clippy lints
# Reference: https://rust-lang.github.io/rust-clippy/master/index.html
# There is no need to specify lints that are already "warn" or "deny" by default.
[workspace.lints.clippy]
absolute_paths = "deny"
arithmetic_side_effects = "allow" # Temporarily: need to enable this and clean all potentially failing arithmetic.
as_ptr_cast_mut = "deny"
assertions_on_result_states = "deny"
bool_to_int_with_if = "deny"
borrow_as_ptr = "deny"
case_sensitive_file_extension_comparisons = "deny"
cast_lossless = "deny"
cast_possible_truncation = "deny"
cast_possible_wrap = "deny"
cast_precision_loss = "deny"
cast_sign_loss = "deny"
cast_ptr_alignment = "deny"
checked_conversions = "deny"
clone_on_ref_ptr = "deny"
cloned_instead_of_copied = "deny"
copy_iterator = "deny"
create_dir = "deny"
default_trait_access = "deny"
default_union_representation = "deny"
deref_by_slicing = "deny"
doc_link_with_quotes = "deny"
doc_markdown = "deny"
empty_drop = "deny"
empty_enum_variants_with_brackets = "deny"
enum_glob_use = "deny"
exhaustive_enums = "allow" # We want to have strict enum checks in the kernel code
exit = "deny"
expl_impl_clone_on_copy = "deny"
explicit_deref_methods = "deny"
explicit_into_iter_loop = "deny"
explicit_iter_loop = "deny"
filetype_is_file = "deny"
filter_map_next = "deny"
flat_map_option = "deny"
float_cmp = "deny"
float_cmp_const = "deny"
fn_params_excessive_bools = "deny"
fn_to_numeric_cast_any = "deny"
format_push_string = "deny"
from_iter_instead_of_collect = "deny"
get_unwrap = "deny"
if_not_else = "deny"
if_then_some_else_none = "deny"
ignored_unit_patterns = "deny"
implicit_clone = "deny"
implicit_hasher = "deny"
inconsistent_struct_constructor = "deny"
index_refutable_slice = "deny"
indexing_slicing = "allow" # There's just toooooo many
inefficient_to_string = "deny"
infinite_loop = "deny"
inline_always = "allow" # We're serious tough dudes here!
integer_division = "allow" # Temporarily, while I figure out what to do with those divs
into_iter_without_iter = "deny"
invalid_upcast_comparisons = "deny"
items_after_statements = "deny"
iter_filter_is_ok = "deny"
iter_filter_is_some = "deny"
iter_not_returning_iterator = "deny"
iter_without_into_iter = "deny"
large_digit_groups = "deny"
large_futures = "deny"
large_include_file = "deny"
large_stack_arrays = "deny"
large_types_passed_by_value = "deny"
let_underscore_must_use = "deny"
let_underscore_untyped = "deny"
linkedlist = "deny"
lossy_float_literal = "deny"
macro_use_imports = "deny"
manual_assert = "deny"
manual_c_str_literals = "deny"
manual_instant_elapsed = "deny"
manual_is_variant_and = "deny"
manual_let_else = "deny"
manual_ok_or = "deny"
manual_string_new = "deny"
many_single_char_names = "deny"
map_err_ignore = "deny"
map_unwrap_or = "deny"
match_bool = "deny"
match_same_arms = "deny"
match_wild_err_arm = "deny"
match_wildcard_for_single_variants = "deny"
maybe_infinite_iter = "deny"
mem_forget = "deny"
mismatching_type_param_order = "deny"
missing_asserts_for_indexing = "deny"
missing_fields_in_debug = "deny"
missing_safety_doc = "deny"
mixed_read_write_in_expression = "deny"
mod_module_files = "allow"
module_name_repetitions = "allow" # Temporarily, because there are too many - but clean this up!
multiple_inherent_impl = "allow" # We use this to have multiple platform-dependent impl pieces.
multiple_unsafe_ops_per_block = "allow" # Don't know how to fix these statics yet.
mut_mut = "deny"
mutex_atomic = "deny"
naive_bytecount = "deny"
needless_bitwise_bool = "deny"
needless_continue = "deny"
needless_for_each = "deny"
needless_pass_by_value = "deny"
needless_raw_string_hashes = "deny"
negative_feature_names = "deny"
no_effect_underscore_binding = "deny"
no_mangle_with_rust_abi = "deny"
option_as_ref_cloned = "deny"
option_option = "deny"
partial_pub_fields = "deny"
ptr_as_ptr = "deny"
ptr_cast_constness = "deny"
pub_underscore_fields = "deny"
pub_without_shorthand = "deny"
range_minus_one = "deny"
range_plus_one = "deny"
rc_buffer = "deny"
rc_mutex = "deny"
redundant_closure_for_method_calls = "deny"
redundant_else = "deny"
redundant_feature_names = "deny"
redundant_type_annotations = "deny"
ref_as_ptr = "deny"
ref_binding_to_reference = "deny"
ref_option_ref = "deny"
renamed_function_params = "allow" # We prefer semantically sensible names, not just `rhs`.
rest_pat_in_fully_bound_structs = "deny"
return_self_not_must_use = "deny"
same_functions_in_if_condition = "deny"
same_name_method = "deny"
semicolon_if_nothing_returned = "deny"
semicolon_inside_block = "deny"
similar_names = "deny"
single_char_pattern = "deny"
stable_sort_primitive = "deny"
str_split_at_newline = "deny"
string_lit_chars_any = "deny"
string_slice = "deny"
struct_excessive_bools = "deny"
struct_field_names = "deny"
suspicious_xor_used_as_pow = "deny"
tests_outside_test_module = "deny" # blocked by https://github.com/rust-lang/rust-clippy/pull/13038
trivially_copy_pass_by_ref = "deny"
try_err = "deny"
unchecked_time_subtraction = "deny"
undocumented_unsafe_blocks = "deny"
unimplemented = "allow" # A lot of things are still unimplemented, but when it's ready...
uninlined_format_args = "deny"
unnecessary_box_returns = "deny"
unnecessary_join = "deny"
unnecessary_safety_comment = "deny"
unnecessary_safety_doc = "deny"
unnecessary_self_imports = "deny"
unnecessary_wraps = "deny"
unneeded_field_pattern = "deny"
unnested_or_patterns = "deny"
unsafe_derive_deserialize = "deny"
unseparated_literal_suffix = "deny"
unused_async = "deny"
unused_self = "deny"
use_debug = "deny"
used_underscore_binding = "deny"
verbose_bit_mask = "deny"
verbose_file_reads = "deny"
wildcard_dependencies = "deny"
zero_sized_map_values = "deny"