Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
328 lines (303 loc) · 12.6 KB
/
Copy pathCargo.toml
File metadata and controls
328 lines (303 loc) · 12.6 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
321
322
323
324
325
326
327
328
[workspace]
resolver = "2"
members = [
"crates/ecolor",
"crates/egui_demo_app",
"crates/egui_demo_lib",
"crates/egui_extras",
"crates/egui_glow",
"crates/egui_inspection",
"crates/egui_kittest",
"crates/egui_system_font_provider",
"crates/egui-wgpu",
"crates/egui-winit",
"crates/egui",
"crates/emath",
"crates/epaint",
"crates/epaint_default_fonts",
"examples/*",
"tests/*",
"xtask",
]
[workspace.package]
edition = "2024"
license = "MIT OR Apache-2.0"
rust-version = "1.95"
version = "0.37.0"
[profile.release]
# lto = true # VERY slightly smaller wasm
# opt-level = 's' # 10-20% smaller wasm compared to `opt-level = 3`
# opt-level = 1 # very slow and big wasm. Don't do this.
opt-level = 2 # fast and small wasm, basically same as `opt-level = 's'`
# opt-level = 3 # unnecessarily large wasm for no performance gain
# debug = true # include debug symbols, useful when profiling wasm
panic = "abort" # This leads to better optimizations and smaller binaries (and is the default in Wasm anyways).
[profile.dev]
# Can't leave this on by default, because it breaks the Windows build. Related: https://github.com/rust-lang/cargo/issues/4897
# split-debuginfo = "unpacked" # faster debug builds on mac
# opt-level = 1 # Make debug builds run faster
# panic = "abort" leads to better optimizations and smaller binaries (and is the default in Wasm anyways),
# but it also means backtraces don't work with the `backtrace` library (https://github.com/rust-lang/backtrace-rs/issues/397).
# egui has a feature where if you hold down all modifiers keys on your keyboard and hover any UI widget,
# you will see the backtrace to that widget, and we don't want to break that feature in dev builds.
[profile.dev.package."*"]
# Optimize all dependencies even in debug builds (does not affect workspace packages):
opt-level = 2
[workspace.dependencies]
emath = { version = "0.37.0", path = "crates/emath", default-features = false }
ecolor = { version = "0.37.0", path = "crates/ecolor", default-features = false }
epaint = { version = "0.37.0", path = "crates/epaint", default-features = false }
epaint_default_fonts = { version = "0.37.0", path = "crates/epaint_default_fonts" }
egui = { version = "0.37.0", path = "crates/egui", default-features = false }
egui-winit = { version = "0.37.0", path = "crates/egui-winit", default-features = false }
egui_extras = { version = "0.37.0", path = "crates/egui_extras", default-features = false }
egui-wgpu = { version = "0.37.0", path = "crates/egui-wgpu", default-features = false }
egui_demo_lib = { version = "0.37.0", path = "crates/egui_demo_lib", default-features = false }
egui_glow = { version = "0.37.0", path = "crates/egui_glow", default-features = false }
egui_inspection = { version = "0.37.0", path = "crates/egui_inspection", default-features = false }
egui_kittest = { version = "0.37.0", path = "crates/egui_kittest", default-features = false }
egui_system_font_provider = { version = "0.37.0", path = "crates/egui_system_font_provider", default-features = false }
eframe = { version = "0.37.0", path = "crates/eframe", default-features = false }
accesskit = "0.25.2"
accesskit_consumer = "0.39.2"
accesskit_winit = "0.34.2"
ahash = { version = "0.8.12", default-features = false, features = [
"no-rng", # we don't need DOS-protection, so we let users opt-in to it instead
"std",
] }
android_logger = "0.15.1"
arboard = { version = "3.7", default-features = false }
backtrace = "0.3.76" # 0.3.77 moved to miniz_oxide 0.9, duplicating the 0.8 that png needs
bitflags = "2.13"
bytemuck = "1.25"
cint = "0.3.1"
color-hex = "0.2.0"
criterion = { version = "0.8.2", default-features = false }
dify = { version = "0.8.0", default-features = false }
directories = "6.0"
document-features = "0.2.12"
ehttp = { version = "0.7.3", default-features = false }
enum-map = "3.1"
env_logger = { version = "0.11.11", default-features = false }
font-types = { version = "0.12.7", default-features = false, features = ["std"] }
fontique = { version = "0.13.0", default-features = false, features = [
"system",
"fontconfig-dlopen", # Load libfontconfig at runtime, so builds don't need its headers
] }
glow = "0.17.0" # Can't update to 0.18: wgpu 30's wgpu-hal pins glow 0.17, so bumping splits it into two versions
glutin = { version = "0.32.3", default-features = false }
glutin-winit = { version = "0.5.0", default-features = false }
harfrust = "0.15.0" # Can't update to 0.16+: it needs read-fonts 0.47, but fontique 0.13, skrifa 0.49, and usvg 0.50 pin read-fonts 0.46
image = { version = "0.25.10", default-features = false } # `flate2` is held at 1.1.9 in `Cargo.lock`: 1.1.10 moved to miniz_oxide 0.9, duplicating the 0.8 that png needs
itertools = "0.15.0"
jiff = { version = "0.2.39", default-features = false }
js-sys = "0.3.103"
kittest = { version = "0.5.0" }
log = { version = "0.4.35", features = ["std"] }
mimalloc = "0.1.52"
mime_guess2 = { version = "2.3", default-features = false }
mint = "0.5.9"
nohash-hasher = "0.2.0"
block2 = "0.6.2"
objc2 = "0.6.5"
objc2-app-kit = { version = "0.3.2", default-features = false }
objc2-foundation = { version = "0.3.2", default-features = false }
objc2-ui-kit = { version = "0.3.2", default-features = false }
open = "5.4"
parking_lot = "0.12.5"
percent-encoding = "2.3"
poll-promise = { version = "0.3.0", default-features = false }
pollster = "1.0"
profiling = { version = "1.0", default-features = false }
puffin = "0.20.0"
puffin_http = "0.17.0"
rand = "0.10.3"
raw-window-handle = "0.6.2"
rayon = "1.12"
resvg = { version = "0.50.0", default-features = false }
rfd = "0.17.2"
rmp-serde = "1.3"
ron = "0.12.3"
self_cell = "1.3"
send_wrapper = "0.6.0"
serde = { version = "1.0", features = ["derive"] }
serde_bytes = "0.11.19"
similar-asserts = "2.0"
skrifa = { version = "0.49.0", default-features = false, features = [
"std",
"autohint_shaping",
] } # Can't update to 0.50+: `glifo` 0.5 (via vello_cpu 0.4) and usvg 0.50 pin skrifa 0.49
smallvec = "1.16"
smithay-clipboard = "0.7.2" # 0.7.3 pulls smithay-client-toolkit 0.20 (calloop 0.14), duplicating the 0.19/0.13 that winit 0.30 needs
static_assertions = "1.1"
syntect = { version = "5.3", default-features = false }
sys-locale = "0.3.2"
tempfile = "3.27"
thiserror = "2.0"
tokio = "1.54"
toml = { version = "1.2", default-features = false }
type-map = "0.5.1"
unicode_names2 = { version = "4.0", default-features = false }
unicode-general-category = "1.1"
unicode-properties = { version = "0.1.5", default-features = false, features = ["emoji"] }
unicode-script = "0.5.9"
unicode-segmentation = "1.13"
vello_cpu = { version = "0.4.0", default-features = false, features = [
"std",
"u8_pipeline",
"f32_pipeline",
] }
wasm-bindgen = "0.2.126" # Keep wasm-bindgen version in sync in: setup_web.sh, Cargo.toml, Cargo.lock, rust.yml. Don't update this spuriously, because of https://github.com/rerun-io/rerun/issues/8766
wasm-bindgen-futures = "0.4.76"
wayland-cursor = { version = "0.31.14", default-features = false }
web-sys = "0.3.103"
web-time = "1.1" # Timekeeping for native and web
webbrowser = "1.2.4" # 1.2.2 fixes RUSTSEC-2026-0257 (`BROWSER` argument injection)
# `wgpu` is held at 30.0.0 in `Cargo.lock`: 30.0.1 needs wasm-bindgen-futures 0.4.77, which would force a wasm-bindgen bump
wgpu = { version = "30.0", default-features = false, features = ["std"] }
windows-sys = "0.61.2"
winit = { version = "0.30.13", default-features = false }
[workspace.lints.rust]
unsafe_code = "deny"
future_incompatible = { level = "warn", priority = -1 }
nonstandard_style = { level = "warn", priority = -1 }
rust_2018_idioms = { level = "warn", priority = -1 }
ambiguous_negative_literals = "warn"
deprecated_in_future = "warn"
impl_trait_redundant_captures = "warn"
macro_use_extern_crate = "warn"
meta_variable_misuse = "warn"
redundant_imports = "warn"
redundant_lifetimes = "warn"
trivial_numeric_casts = "warn"
unit_bindings = "warn"
unnameable_types = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
trivial_casts = "allow"
unused_qualifications = "allow"
# `web_sys_unstable_apis` changes some signatures, so we need to check for presence of that flag. This whitelists
# checking `cfg(web_sys_unstable_apis)` (which the unexpected_cfgs would otherwise deny):
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(web_sys_unstable_apis)'] }
[workspace.lints.rustdoc]
all = "warn"
# See also clippy.toml
[workspace.lints.clippy]
# `all` = `correctness` + `suspicious` + `style` + `complexity` + `perf`.
# The remaining groups are `nursery` and `restriction`,
# which are not meant to be enabled wholesale - we cherry-pick from them below.
all = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
allow_attributes = "warn"
as_ptr_cast_mut = "warn"
branches_sharing_code = "warn"
clear_with_drain = "warn"
clone_on_ref_ptr = "warn"
coerce_container_to_any = "warn"
dbg_macro = "warn"
debug_assert_with_mut_call = "warn"
default_union_representation = "warn"
derive_partial_eq_without_eq = "warn"
disallowed_script_idents = "warn" # See clippy.toml
doc_include_without_cfg = "warn"
empty_enum_variants_with_brackets = "warn"
equatable_if_let = "warn"
exit = "warn"
fallible_impl_from = "warn"
float_cmp_const = "warn"
fn_to_numeric_cast_any = "warn"
get_unwrap = "warn"
imprecise_flops = "warn"
infinite_loop = "warn"
iter_on_empty_collections = "warn"
iter_on_single_items = "warn"
iter_over_hash_type = "warn"
large_include_file = "warn"
large_stack_frames = "warn"
literal_string_with_formatting_args = "warn"
lossy_float_literal = "warn"
map_err_ignore = "warn"
mem_forget = "warn"
missing_assert_message = "warn"
mutex_integer = "warn"
needless_pass_by_ref_mut = "warn"
needless_type_cast = "warn"
non_zero_suggestions = "warn"
nonstandard_macro_braces = "warn"
or_fun_call = "warn"
path_buf_push_overwrite = "warn"
pathbuf_init_then_push = "warn"
precedence_bits = "warn"
print_stderr = "warn"
print_stdout = "warn"
pub_without_shorthand = "warn"
rc_mutex = "warn"
redundant_type_annotations = "warn"
ref_patterns = "warn"
rest_pat_in_fully_bound_structs = "warn"
return_and_then = "warn"
set_contains_or_insert = "warn"
single_option_map = "warn"
std_instead_of_core = "warn"
str_to_string = "warn"
string_add = "warn"
string_lit_as_bytes = "warn"
string_lit_chars_any = "warn"
suspicious_xor_used_as_pow = "warn"
todo = "warn"
too_long_first_doc_paragraph = "warn"
trailing_empty_array = "warn"
trait_duplication_in_bounds = "warn"
tuple_array_conversions = "warn"
undocumented_unsafe_blocks = "warn"
unimplemented = "warn"
uninhabited_references = "warn"
unnecessary_safety_comment = "warn"
unnecessary_safety_doc = "warn"
unnecessary_self_imports = "warn"
unnecessary_struct_initialization = "warn"
unused_peekable = "warn"
unused_rounding = "warn"
unused_trait_names = "warn"
unwrap_used = "warn"
use_self = "warn"
useless_let_if_seq = "warn"
verbose_file_reads = "warn"
# Pedantic lints we opt out of, with the number of hits at the time we enabled `pedantic`:
cast_lossless = "allow" # 204 hits
cast_possible_truncation = "allow" # 287 hits
cast_possible_wrap = "allow" # 43 hits
cast_precision_loss = "allow" # 200 hits
cast_sign_loss = "allow" # 98 hits
comparison_chain = "allow"
default_trait_access = "allow" # 278 hits
float_cmp = "allow" # exact float comparisons are usually intentional (`float_cmp_const` is still on)
inline_always = "allow" # 271 hits; we know what we are doing
items_after_statements = "allow" # 82 hits
many_single_char_names = "allow" # `r, g, b, a` and `h, s, v` are fine
missing_panics_doc = "allow" # 68 hits
must_use_candidate = "allow" # 1169 hits
redundant_closure_for_method_calls = "allow" # 89 hits
return_self_not_must_use = "allow" # 246 hits
should_panic_without_expect = "allow"
similar_names = "allow" # too many false positives, e.g. `encoder`/`encoded`
struct_excessive_bools = "allow" # 32 hits
struct_field_names = "allow" # 23 hits
too_many_lines = "allow"
trivially_copy_pass_by_ref = "allow" # 119 hits
unreadable_literal = "allow" # 513 hits
used_underscore_binding = "allow" # 25 hits
# Other:
assigning_clones = "allow" # No please
manual_range_contains = "allow" # this one is just worse imho
map_unwrap_or = "allow" # so is this one
multiple_crate_versions = "allow" # we handle this with `cargo deny`
wildcard_imports = "allow" # `use crate::*` is useful to avoid merge conflicts when adding/removing imports
# NOTE: these are in `restriction`/`nursery`, so the `allow` is a no-op today.
# We keep them to record our intent in case we ever enable those groups.
let_underscore_must_use = "allow"
let_underscore_untyped = "allow"
self_named_module_files = "allow" # Disabled waiting on https://github.com/rust-lang/rust-clippy/issues/9602
significant_drop_tightening = "allow" # Too many false positives