Next Generation WASM Microkernel Operating System
1[workspace]
2members = ["kernel", "libs/*", "build/*", "loader", "loader/api", "libs/ktest/macros"]
3resolver = "3"
4
5[workspace.package]
6version = "0.1.0"
7edition = "2024"
8authors = ["Jonas Kruckenberg <iterpre@protonmail.com>"]
9license = "MIT OR Apache-2.0"
10
11[workspace.lints.rust]
12# allow loom
13unexpected_cfgs = { level = "warn", check-cfg = ['cfg(loom)'] }
14
15[workspace.lints.clippy]
16# numeric safety
17#arithmetic_side_effects = "deny" TODO audit arithmetic & reenable
18cast_possible_truncation = "deny"
19cast_possible_wrap = "deny"
20cast_precision_loss = "deny"
21cast_sign_loss = "deny"
22cast_lossless = "deny"
23default_numeric_fallback = "deny"
24checked_conversions = "deny"
25float_arithmetic = "deny"
26float_cmp = "deny"
27
28# pointer safety
29cast_ptr_alignment = "deny"
30ptr_as_ptr = "deny"
31ptr_cast_constness = "deny"
32ref_as_ptr = "deny"
33transmute_ptr_to_ptr = "deny"
34
35## panic safety
36#indexing_slicing = "deny"
37#panic = "deny"
38#panic_in_result_fn = "deny"
39
40# stack overflow prevention
41large_futures = "deny"
42large_stack_arrays = "deny"
43large_stack_frames = "deny"
44large_types_passed_by_value = "deny"
45recursive_format_impl = "deny"
46
47# style
48undocumented_unsafe_blocks = "deny"
49as_underscore = "deny"
50alloc_instead_of_core = "deny"
51#allow_attributes = "deny"
52allow_attributes_without_reason = "deny"
53default_trait_access = "deny"
54cloned_instead_of_copied = "deny"
55fn_params_excessive_bools = "deny"
56struct_excessive_bools = "deny"
57filter_map_next = "deny"
58explicit_iter_loop = "deny"
59flat_map_option = "deny"
60iter_filter_is_ok = "deny"
61iter_filter_is_some = "deny"
62manual_assert = "deny"
63manual_is_power_of_two = "deny"
64manual_is_variant_and = "deny"
65manual_let_else = "deny"
66manual_ok_or = "deny"
67match_bool = "deny"
68missing_fields_in_debug = "deny"
69semicolon_if_nothing_returned = "deny"
70trivially_copy_pass_by_ref = "deny"
71unnecessary_wraps = "deny"
72unnested_or_patterns = "deny"
73too_many_arguments = "allow"
74
75# docs
76missing_panics_doc = "deny"
77missing_errors_doc = "deny"
78
79[workspace.dependencies]
80kaddr2line = { path = "libs/kaddr2line" }
81kbacktrace = { path = "libs/kbacktrace" }
82riscv = { path = "libs/riscv" }
83spin = { path = "libs/spin" }
84trap = { path = "libs/trap" }
85cpu-local = { path = "libs/cpu-local" }
86unwind2 = { path = "libs/unwind2" }
87wast = { path = "libs/wast" }
88wavltree = { path = "libs/wavltree" }
89loader-api = { path = "loader/api" }
90fdt = { path = "libs/fdt" }
91ksharded-slab = { path = "libs/ksharded-slab" }
92ktest = { path = "libs/ktest" }
93uart-16550 = { path = "libs/uart-16550" }
94fastrand = { path = "libs/fastrand" }
95abort = { path = "libs/abort" }
96panic-unwind2 = { path = "libs/panic-unwind2" }
97util = { path = "libs/util"}
98kasync = { path = "libs/kasync" }
99
100# 3rd-party dependencies
101cfg-if = "1.0.0"
102log = "0.4.27"
103bitflags = "2.9.1"
104lock_api = "0.4.12"
105xmas-elf = "0.10.0"
106static_assertions = "1.1.0"
107rand = { version = "0.9.1", default-features = false }
108rand_chacha = { version = "0.9.0", default-features = false }
109arrayvec = { version = "0.7.6", default-features = false }
110gimli = { version = "0.31.1", default-features = false, features = ["read"] }
111talc = { version = "4.4.2", default-features = false, features = ["lock_api", "counters"] }
112smallvec = { version = "1", default-features = false }
113rustc-demangle = "0.1"
114fallible-iterator = { version = "0.3.0", default-features = false }
115bumpalo = "3.17.0"
116ouroboros = "0.18.5"
117mycelium-bitfield = "0.1.5"
118tracing = { version = "0.2", git = "https://github.com/tokio-rs/tracing", branch = "master", default-features = false, features = ["attributes"] }
119tracing-core = { version = "0.2", git = "https://github.com/tokio-rs/tracing", branch = "master", default-features = false }
120anyhow = { version = "1.0.98", default-features = false }
121loom = "0.7"
122criterion = "0.6.0"
123lazy_static = "1.5.0"
124cordyceps = "0.3.4"
125futures = { version = "0.3.31", default-features = false }
126pin-project = "1.1.10"
127
128# wast dependencies
129unicode-width = { version = "0.2.0" }
130memchr = { version = "2.7.4", default-features = false }
131leb128fmt = { version = "0.1.0", default-features = false }
132wasm-encoder = { version = "0.232.0", default-features = false }
133wat = "1.219.1"
134
135# cranelift dependencies
136hashbrown = { version = "0.15", default-features = false, features = [
137 "inline-more",
138 "nightly",
139 "default-hasher",
140] }
141wasmparser = { version = "0.228", default-features = false, features = ["features", "validate", "simd"] }
142target-lexicon = { version = "0.13.2", default-features = false }
143cranelift-codegen = { git = "https://github.com/JonasKruckenberg/wasmtime.git", branch = "main", default-features = false, features = ["host-arch", "core"] }
144cranelift-frontend = { git = "https://github.com/JonasKruckenberg/wasmtime.git", branch = "main", default-features = false, features = ["core"] }
145cranelift-entity = { git = "https://github.com/JonasKruckenberg/wasmtime.git", branch = "main", default-features = false }
146wasmtime-slab = "34.0.0"
147
148# build dependencies
149proc-macro2 = "1"
150quote = "1"
151syn = { version = "2", features = ["full"] }
152color-eyre = "0.6.4"
153eyre = "0.6.12"
154clap = { version = "4.5.38", features = ["derive", "env"] }
155serde = { version = "1.0.219", features = ["derive"] }
156toml = "0.8.22"
157toml_edit = "0.22.26"
158indoc = "2.0.6"
159tracing-subscriber = { version = "0.3", git = "https://github.com/tokio-rs/tracing", branch = "master" }
160tracing-error = { version = "0.2", git = "https://github.com/tokio-rs/tracing", branch = "master" }
161heck = "0.5.0"
162wait-timeout = "0.2.1"
163
164[profile.release]
165debug = "limited" # The kernel should be able to print stack traces of itself even in release mode
166
167# Custom profile for Loom tests: enable release optimizations so that the loom
168# tests are less slow, but don't disable debug assertions.
169[profile.loom]
170inherits = "test"
171lto = true
172opt-level = 3
173
174[patch.crates-io]
175regalloc2 = { git = "https://github.com/JonasKruckenberg/regalloc2", branch = "jonas/refactor/static-machine-env" }