Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
106 lines (96 loc) · 2.85 KB
/
Copy pathCargo.toml
File metadata and controls
106 lines (96 loc) · 2.85 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
[package]
name = "kernel"
version = "0.1.0"
authors = ["Collin <chbaker0@gmail.com>"]
edition = "2024"
[lints]
workspace = true
[workspace]
members = [
".",
"buildutil", "fetch-prebuilts",
"init",
"loader",
"mkimage",
"shared",
]
default-members = ["."]
resolver = "2"
[workspace.lints.rust]
unsafe_op_in_unsafe_fn = "deny"
never_type_fallback_flowing_into_unsafe = "deny"
# `deny`: the pre-existing debt these were held back on (issue #23 in
# src/kmain.rs, plus undocumented/misplaced safety docs in shared and the
# loader) is cleared, so these now gate rather than merely warn. Every
# `unsafe` block needs a `// SAFETY:` comment, and `# Safety` doc sections
# belong only on genuinely `unsafe` items.
[workspace.lints.clippy]
undocumented_unsafe_blocks = "deny"
missing_safety_doc = "deny"
unnecessary_safety_comment = "deny"
unnecessary_safety_doc = "deny"
[workspace.dependencies]
aligned = "0.4.3"
arrayvec = { version = "0.7.6", default-features = false }
bitfield-struct = "0.13.0"
bitflags = "2.10.0"
cargo_metadata = "0.23.1"
cfg-if = "1.0"
clap = "4"
color-eyre = { version = "0.6", default-features = false }
elf = { version = "0.8.0", default-features = false }
env_logger = "0.11.8"
eyre = "0.6"
intrusive-collections = { version = "0.10.0", default-features = false, features = ["nightly"] }
itertools = { version = "0.15.0", default-features = false }
memoffset = "0.9.1"
lazy_static = { version = "1.5.0", default-features = false }
log = "0.4.29"
multiboot2 = "0.25.0"
num-derive = "0.4"
num-traits = { version = "0.2", default-features = false }
once_cell = { version = "1.21.3", default-features = false }
ovmf-prebuilt = "0.2.7"
pretty_assertions = "1.4.1"
proptest = "1.9.0"
spin = "0.12.2"
static_assertions = "1.1.0"
test-log = "0.2.19"
uefi = "0.39.0"
xmas-elf = "0.10.0"
x86_64 = "0.15.4"
[features]
default = ["qemu_debugcon"]
qemu_debugcon = []
[dependencies]
shared = { path = "shared" }
bitflags = { workspace = true }
cfg-if = { workspace = true }
lazy_static = { workspace = true, features = ["spin_no_std"] }
log = { workspace = true }
multiboot2 = { workspace = true }
once_cell = { workspace = true }
spin = { workspace = true }
static_assertions = { workspace = true }
uefi = { workspace = true }
xmas-elf = { workspace = true }
x86_64 = { workspace = true }
# Build most dependencies with optimizations in debug mode. Most debuggable
# issues are unlikely to come from most crates.io deps. This doesn't affect
# workspace packages.
#
# Optimizing dependencies, especially the standard library, significantly
# improves debug mode performance.
[profile.dev.package."*"]
opt-level = 2
debug = 1
debug-assertions = true
overflow-checks = true
# Dependencies aren't rebuilt often, so there's not a strong reason to use
# incremental builds.
incremental = false
codegen-units = 1
[profile.release]
lto = "thin"
incremental = false
codegen-units = 1