-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathCargo.toml
More file actions
188 lines (181 loc) · 10.3 KB
/
Copy pathCargo.toml
File metadata and controls
188 lines (181 loc) · 10.3 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
[workspace]
resolver = "3"
members = ["components/*", "core/*", "sdk/*", "patina_dxe_core"]
[workspace.package]
version = "23.2.0"
license = "Apache-2.0"
edition = "2024"
rust-version = "1.90"
repository = "https://github.com/OpenDevicePartnership/patina"
keywords = ["uefi", "firmware", "edk2"]
categories = ["embedded", "no-std", "hardware-support"]
[workspace.dependencies]
# alloc-no-stdlib is pinned to the 2.x because brotli-decompressor 5.0.3 (the latest release)
# requires `alloc-no-stdlib = ">=2.0.4, <3"`. Bumping to 3.x causes two incompatible copies of
# alloc-no-stdlib to appear in the dependency graph. Revisit once brotli-decompressor supports 3.x.
alloc-no-stdlib = { version = "2.0" }
arm-gic = { version = "0.8.1" }
safe-mmio = { version = "0.3.0" }
bitfield-struct = { version = "0.13" }
bitvec = { version = "1", default-features = false }
brotli-decompressor = { version = "5.0.3", default-features = false }
cfg-if = { version = "1" }
clap = { version = "4.6.1" }
compile-time = { version = "0.2" }
crc32fast = { version = "1.5", default-features = false }
fallible-streaming-iterator = { version = "0.1.9" }
fixedbitset = { version = "0.5", default-features = false }
gdbstub = { version = "0.7.10", default-features = false }
goblin = { version = "0.10.7", default-features = false }
linked_list_allocator = { version = "0.10" }
linkme = { version = "0.3.36" }
log = { version = "0.4", default-features = false }
memoffset = {version = "0.9.1" }
num-traits = { version = "0.2", default-features = false }
patina = { version = "23.2.0", path = "sdk/patina" }
patina_debugger = { version = "23.2.0", path = "core/patina_debugger" }
patina_ffs = { version = "23.2.0", path = "sdk/patina_ffs" }
patina_ffs_extractors = { version = "23.2.0", path = "sdk/patina_ffs_extractors" }
patina_internal_core = { version = "23.2.0", path = "core/patina_internal_core", default-features = false }
patina_internal_cpu = { version = "23.2.0", path = "core/patina_internal_cpu" }
lzma-rust2 = { version = "0.16", default-features = false }
patina_macro = { version = "23.2.0", path = "sdk/patina_macro" }
patina_mm = { version = "23.2.0", path = "components/patina_mm" }
patina_mtrr = { version = "1.1.9" }
patina_paging = { version = "11.0.4" }
patina_performance = { version = "23.2.0", path = "components/patina_performance" }
patina_smbios = { version = "23.2.0", path = "components/patina_smbios" }
patina_stacktrace = { version = "23.2.0", path = "core/patina_stacktrace" }
patina_test = { version = "23.2.0", path = "components/patina_test" }
proc-macro2 = { version = "1" }
quote = { version = "1" }
scroll = { version = "0.13", default-features = false, features = ["derive"]}
spin = { version = "0.12" }
syn = { version = "3" }
uart_16550 = { version = "0.8" }
corosensei = { version = "0.3.4", default-features = false }
uuid = { version = "1.23", default-features = false }
zerocopy = { version = "0.8" }
zerocopy-derive = { version = "0.8" }
# dev dependencies
criterion = { version = "0.8" }
env_logger = "0.11"
mockall = { version = "0.15.0" }
rand = { version = "0.10" }
ruint = { version = "1.20" }
serial_test = { version = "3.5" }
serde = { version = "1.0", default-features = false, features = ["derive"] }
serde_yaml = { version = "0.9" }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
[workspace.lints.clippy]
###########################
# Clippy Groups
###########################
cargo = { level = "warn", priority = -1 }
complexity = { level = "warn", priority = -1 }
correctness = { level = "deny", priority = -1 }
pedantic = { level = "warn", priority = -1 }
perf = { level = "warn", priority = -1 }
style = { level = "warn", priority = -1 }
suspicious = { level = "warn", priority = -1 }
###########################
# Individual Lint Overrides
###########################
# cargo::redundant_feature_names violation - Fixes:
# `the "_support" suffix in the feature name "v1_resource_descriptor_support" is redundant`
# This is allowed until the v1_resource_descriptor_support feature is dropped.
redundant_feature_names = "allow"
# pedantic::cast_possible_truncation - Temporarily allowed until all cases are updated (each fix needs a lot of
# attention) to determine if the truncation is intentional and safe or not.
cast_possible_truncation = "allow"
# pedantic::cast_possible_wrap - Higher priority. Temporarily allowed until each instance is reviewed. About 20
# instances currently in the codebase.
cast_possible_wrap = "allow"
# pedantic::cast_precision_loss - Higher priority. Temporarily allowed until each instance is reviewed. About 9
# instances currently in the codebase.
cast_precision_loss = "allow"
# pedantic::cast_ptr_alignment - Higher priority. Temporarily allowed until each instance is reviewed.
cast_ptr_alignment = "allow"
# pedantic::cast_sign_loss - Higher priority. Temporarily allowed until each instance is reviewed.
# About 15 instances currently in the codebase.
cast_sign_loss = "allow"
# pedantic::elidable_lifetime_names - Allowed because the automock macro cannot handle anonymous lifetimes in traits.
elidable_lifetime_names = "allow"
# pedantic::inline_always - Temporarily allowed until each instance is evaluated to determine if the inline is
# necessary or not.
inline_always = "allow"
# pedantic::items_after_statements - Temporarily allowed until all cases are updated.
items_after_statements = "allow"
# pedantic::iter_without_into_iter - Temporarily allowed until all cases are updated.
iter_without_into_iter = "allow"
# pedantic::large_stack_arrays - Higher priority. Temporarily allowed until each instance is reviewed. About 33
# instances currently in the codebase.
large_stack_arrays = "allow"
# pedantic::manual_let_else - Temporarily allowed until all cases are updated.
manual_let_else = "allow"
# pedantic::match_wild_err_arm - Temporarily allowed until further review of each instance is completed to determine
# if the wildcard arm is appropriate or not.
match_wild_err_arm = "allow"
# pedantic::missing_errors_doc - Temporarily allowed until all cases are updated (each fix needs a lot of attention).
missing_errors_doc = "allow"
# pedantic::missing_panics_doc - Temporarily allowed until all cases are updated. Each fix needs a lot of attention to
# (1) determine if the panic is intentional and safe or not, and (2) write appropriate
# documentation for the panic scenario.
missing_panics_doc = "allow"
# pedantic::must_use_candidate - Allowed due to the number of instances, a degree of subjectivity in determining if
# a function should be marked must_use, and the potential for breaking public APIs.
must_use_candidate = "allow"
# pedantic::needless_continue - Temporarily allowed until each instance is updated to determine the best
# approach for each case.
needless_continue = "allow"
# pedantic::needless_pass_by_value - Temporarily allowed due to the number of instances that need updated in existing
# code. Each update needs to be carefully reviewed.
needless_pass_by_value = "allow"
# pedantic::ptr_as_ptr - Temporarily allowed until all instances are fixed. Remaining instances in pre-existing code
# code need further inspection.
ptr_as_ptr = "allow"
# pedantic::pub_underscore_fields - Temporarily allowed until each instance is reviewed.
pub_underscore_fields = "allow"
# pedantic::ref_option_ref - All occurrences are currently related to automock. Revisit to determine if this should
# stay allowed.
ref_option_ref = "allow"
# pedantic::should_panic_without_expect - Temporarily allowed until each instance is updated to have a custom panic
# message.
should_panic_without_expect = "allow"
# pedantic::similar_names - Allowed due to substantial impact to public APIs and relatively low risk of confusion.
similar_names = "allow"
# pedantic::struct_field_names - Temporarily allowed due to a substantial impact to public APIs.
struct_field_names = "allow"
# pedantic::too_many_lines - Temporarily allowed until all cases are updated (each fix needs a lot of attention) since
# large functions (> 100 lines) may need additional refactoring in surrounding code.
too_many_lines = "allow"
# pedantic::trivially_copy_pass_by_ref - Higher priority. Temporarily allowed until each instance is reviewed.
# About 17 instances currently in the codebase.
trivially_copy_pass_by_ref = "allow"
# pedantic::unnecessary_box_returns - Temporarily allowed until each instance is reviewed. Impact on APIs for each
# case needs to be assessed.
unnecessary_box_returns = "allow"
# pedantic::unnecessary_wraps - In most cases this is probably fine, but each case needs to be reviewed to determine
# the impact on the API.
unnecessary_wraps = "allow"
# pedantic::unreadable_literal - Temporarily allowed until all cases are updated. Simple changes but thousands of
# instances to fix.
unreadable_literal = "allow"
# pedantic::unused_self - Temporarily allowed until each instance is reviewed.
unused_self = "allow"
# pedantic::verbose_bit_mask - Allowed due to project preference for flexibility in how to represent operations.
verbose_bit_mask = "allow"
# restriction::indexing_slicing - Denied to prevent panics resulting from out-of-bounds indexing.
indexing_slicing = "deny"
# restriction::undocumented_unsafe_blocks - Denied to ensure all unsafe blocks are documented with SAFETY comments.
undocumented_unsafe_blocks = "deny"
[workspace.lints.rust]
# Set by cargo-llvm-cov during coverage runs. Declared here so gating
# `coverage_attribute` behind it does not trigger unexpected_cfgs warnings.
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage)'] }
# Profile used to build workspace dependencies for `mdbook test`. Inherits from `dev`
# but disables LTO so that the resulting rlibs contain machine code and can be linked
# by `rustdoc --test` when running the doctests embedded in the mdbook.
[profile.mdbook]
inherits = "dev"
lto = false