Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
258 lines (233 loc) · 8.88 KB
/
Copy pathCargo.toml
File metadata and controls
258 lines (233 loc) · 8.88 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
[workspace]
resolver = "2"
members = [
"egui_plot",
"demo",
"examples_utils",
"examples/*",
]
[workspace.package]
edition = "2024"
license = "MIT OR Apache-2.0"
rust-version = "1.95"
version = "0.38.0"
[profile.release]
opt-level = 2 # fast and small wasm
[profile.dev.package."*"]
# Optimize all dependencies even in debug builds (does not affect workspace packages):
opt-level = 2
[workspace.dependencies]
egui_plot = { version = "0.38.0", path = "egui_plot", default-features = false }
examples_utils = { version = "0.1.0", path = "examples_utils" }
borrow_points = { version = "0.1.0", path = "examples/borrow_points" }
box_plot = { version = "0.1.0", path = "examples/box_plot" }
custom_axes = { version = "0.1.0", path = "examples/custom_axes" }
custom_plot_manipulation = { version = "0.1.0", path = "examples/custom_plot_manipulation" }
filled_area = { version = "0.1.0", path = "examples/filled_area" }
heatmap = { version = "0.1.0", path = "examples/heatmap" }
histogram = { version = "0.1.0", path = "examples/histogram" }
interaction = { version = "0.1.0", path = "examples/interaction" }
items = { version = "0.1.0", path = "examples/items" }
legend = { version = "0.1.0", path = "examples/legend" }
legend_sort = { version = "0.1.0", path = "examples/legend_sort" }
lines = { version = "0.1.0", path = "examples/lines" }
linked_axes = { version = "0.1.0", path = "examples/linked_axes" }
markers = { version = "0.1.0", path = "examples/markers" }
performance_lines = { version = "0.1.0", path = "examples/performance_lines" }
performance_markers = { version = "0.1.0", path = "examples/performance_markers" }
plot_span = { version = "0.1.0", path = "examples/plot_span" }
save_plot = { version = "0.1.0", path = "examples/save_plot" }
stacked_bar = { version = "0.1.0", path = "examples/stacked_bar" }
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",
] }
assertables = "9.8.2"
document-features = "0.2.12"
eframe = { version = "0.37.0", default-features = false }
egui = { version = "0.37.0", default-features = false }
egui_extras = { version = "0.37.0", default-features = false }
egui_kittest = { version = "0.37.0", default-features = false }
emath = { version = "0.37.0", default-features = false }
env_logger = { version = "0.11.8", default-features = false, features = [
"auto-color",
"humantime",
] }
image = { version = "0.25", default-features = false }
log = "0.4"
nohash-hasher = "0.2.0"
serde = { version = "1", features = ["derive"] }
wasm-bindgen-futures = "0.4"
web-sys = "0.3.83"
[patch.crates-io]
# When we want to use the bleeding edge version of egui and eframe:
# eframe = { git = "https://github.com/emilk/egui", branch = "main" }
# egui = { git = "https://github.com/emilk/egui", branch = "main" }
# egui_extras = { git = "https://github.com/emilk/egui", branch = "main" }
# egui_kittest = { git = "https://github.com/emilk/egui", branch = "main" }
# emath = { git = "https://github.com/emilk/egui", branch = "main" }
# If you fork https://github.com/emilk/egui you can test with:
# eframe = { path = "../egui/crates/eframe" }
# egui = { path = "../egui/crates/egui" }
# egui_extras = { path = "../egui/crates/egui_extras" }
# egui_kittest = { path = "../egui/crates/egui_kittest" }
# emath = { path = "../egui/crates/emath" }
# ----------------------------------------------------------------------------------------
# Lints:
[workspace.lints.rust]
unsafe_code = "deny"
elided_lifetimes_in_paths = "warn"
future_incompatible = { level = "warn", priority = -1 }
nonstandard_style = { level = "warn", priority = -1 }
rust_2018_idioms = { level = "warn", priority = -1 }
rust_2021_prelude_collisions = "warn"
semicolon_in_expressions_from_macros = "warn"
trivial_numeric_casts = "warn"
unexpected_cfgs = "warn"
unsafe_op_in_unsafe_fn = "warn" # `unsafe_op_in_unsafe_fn` may become the default in future Rust versions: https://github.com/rust-lang/rust/issues/71668
unused_extern_crates = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
trivial_casts = "allow"
unused_qualifications = "allow"
[workspace.lints.rustdoc]
all = "warn"
broken_intra_doc_links = "warn"
missing_crate_level_docs = "warn"
# See also clippy.toml
[workspace.lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
allow_attributes = "warn"
as_ptr_cast_mut = "warn"
await_holding_lock = "warn"
branches_sharing_code = "warn"
char_lit_as_u8 = "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_macros = "warn" # See clippy.toml
disallowed_methods = "warn" # See clippy.toml
disallowed_names = "warn" # See clippy.toml
disallowed_script_idents = "warn" # See clippy.toml
disallowed_types = "warn" # See clippy.toml
doc_include_without_cfg = "warn"
empty_enum_variants_with_brackets = "warn"
empty_line_after_outer_attr = "warn"
equatable_if_let = "warn"
exit = "warn"
expect_used = "warn"
fallible_impl_from = "warn"
float_cmp_const = "warn"
fn_to_numeric_cast_any = "warn"
get_unwrap = "warn"
if_let_mutex = "warn"
implied_bounds_in_impls = "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"
let_underscore_must_use = "warn"
let_underscore_untyped = "warn"
let_unit_value = "warn"
literal_string_with_formatting_args = "warn"
lossy_float_literal = "warn"
manual_clamp = "warn"
manual_ilog2 = "warn"
manual_ok_or = "warn"
map_err_ignore = "warn"
map_flatten = "warn"
mem_forget = "warn"
missing_assert_message = "warn"
missing_enforced_import_renames = "warn"
missing_safety_doc = "warn"
mixed_attributes_style = "warn"
mutex_integer = "warn"
needless_borrow = "warn"
needless_pass_by_ref_mut = "warn"
needless_type_cast = "warn"
negative_feature_names = "warn"
non_zero_suggestions = "warn"
nonstandard_macro_braces = "warn"
only_used_in_recursion = "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"
readonly_write_lock = "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"
str_to_string = "warn"
string_add = "warn"
string_lit_as_bytes = "warn"
string_lit_chars_any = "warn"
suspicious_command_arg_space = "warn"
suspicious_xor_used_as_pow = "warn"
todo = "warn"
too_long_first_doc_paragraph = "warn"
too_many_arguments = "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"
useless_transmute = "warn"
verbose_file_reads = "warn"
wildcard_dependencies = "warn"
# Pedantic lints we opt out of, with the number of hits at the time we enabled `pedantic`.
# Lints that were already enabled here one-by-one are kept on.
cast_lossless = "allow" # 57 hits
cast_possible_truncation = "allow" # 36 hits
cast_precision_loss = "allow" # 38 hits
cast_sign_loss = "allow" # 9 hits
default_trait_access = "allow" # 12 hits
float_cmp = "allow" # exact float comparisons are usually intentional (`float_cmp_const` is still on)
inline_always = "allow" # we know what we are doing
items_after_statements = "allow" # 3 hits
many_single_char_names = "allow" # `r, g, b, a` and `h, s, v` are fine
missing_panics_doc = "allow" # 2 hits
must_use_candidate = "allow" # 181 hits
redundant_closure_for_method_calls = "allow" # 13 hits
return_self_not_must_use = "allow" # 194 hits
similar_names = "allow" # too many false positives, e.g. `encoder`/`encoded`
struct_excessive_bools = "allow" # 3 hits
struct_field_names = "allow" # 3 hits
trivially_copy_pass_by_ref = "allow" # 3 hits
unreadable_literal = "allow"
used_underscore_binding = "allow"
# These are meh:
assigning_clones = "allow" # No please
manual_range_contains = "allow" # this one is just worse imho
map_unwrap_or = "allow" # so is this one
# 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.
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
[workspace.metadata.cargo-shear]
ignored = ["log", "assertables"]