mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
<!-- Please read the "Making a PR" section of [`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/main/CONTRIBUTING.md) before opening a Pull Request! * Keep your PR:s small and focused. * The PR title is what ends up in the changelog, so make it descriptive! * If applicable, add a screenshot or gif. * If it is a non-trivial addition, consider adding a demo for it to `egui_demo_lib`, or a new example. * Do NOT open PR:s from your `master` branch, as that makes it hard for maintainers to test and add commits to your PR. * Remember to run `cargo fmt` and `cargo clippy`. * Open the PR as a draft until you have self-reviewed it and run `./scripts/check.sh`. * When you have addressed a PR comment, mark it as resolved. Please be patient! I will review your PR, but my time is limited! --> * [x] I have followed the instructions in the PR template Update some of the core dependencies and run cargo update for selected dependencies to remove total number and older versions.
327 lines
11 KiB
TOML
327 lines
11 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
members = [
|
|
"crates/ecolor",
|
|
"crates/egui_demo_app",
|
|
"crates/egui_demo_lib",
|
|
"crates/egui_extras",
|
|
"crates/egui_glow",
|
|
"crates/egui_kittest",
|
|
"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.86"
|
|
version = "0.32.1"
|
|
|
|
|
|
[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.32.1", path = "crates/emath", default-features = false }
|
|
ecolor = { version = "0.32.1", path = "crates/ecolor", default-features = false }
|
|
epaint = { version = "0.32.1", path = "crates/epaint", default-features = false }
|
|
epaint_default_fonts = { version = "0.32.1", path = "crates/epaint_default_fonts" }
|
|
egui = { version = "0.32.1", path = "crates/egui", default-features = false }
|
|
egui-winit = { version = "0.32.1", path = "crates/egui-winit", default-features = false }
|
|
egui_extras = { version = "0.32.1", path = "crates/egui_extras", default-features = false }
|
|
egui-wgpu = { version = "0.32.1", path = "crates/egui-wgpu", default-features = false }
|
|
egui_demo_lib = { version = "0.32.1", path = "crates/egui_demo_lib", default-features = false }
|
|
egui_glow = { version = "0.32.1", path = "crates/egui_glow", default-features = false }
|
|
egui_kittest = { version = "0.32.1", path = "crates/egui_kittest", default-features = false }
|
|
eframe = { version = "0.32.1", path = "crates/eframe", default-features = false }
|
|
|
|
accesskit = "0.19.0"
|
|
accesskit_winit = "0.27"
|
|
ahash = { version = "0.8.11", default-features = false, features = [
|
|
"no-rng", # we don't need DOS-protection, so we let users opt-in to it instead
|
|
"std",
|
|
] }
|
|
backtrace = "0.3"
|
|
bitflags = "2.6"
|
|
bytemuck = "1.23.2"
|
|
criterion = { version = "0.7", default-features = false }
|
|
dify = { version = "0.7", default-features = false }
|
|
document-features = "0.2.10"
|
|
glow = "0.16"
|
|
glutin = { version = "0.32.0", default-features = false }
|
|
glutin-winit = { version = "0.5.0", default-features = false }
|
|
home = "0.5.9"
|
|
image = { version = "0.25", default-features = false }
|
|
kittest = { version = "0.2.0" }
|
|
log = { version = "0.4", features = ["std"] }
|
|
mimalloc = "0.1.46"
|
|
nohash-hasher = "0.2"
|
|
parking_lot = "0.12"
|
|
pollster = "0.4"
|
|
profiling = { version = "1.0.16", default-features = false }
|
|
puffin = "0.19"
|
|
puffin_http = "0.16"
|
|
raw-window-handle = "0.6.0"
|
|
ron = "0.11"
|
|
serde = { version = "1", features = ["derive"] }
|
|
similar-asserts = "1.4.2"
|
|
smallvec = "1"
|
|
thiserror = "1.0.37"
|
|
type-map = "0.5.0"
|
|
unicode-segmentation = "1.12.0"
|
|
wasm-bindgen = "0.2"
|
|
wasm-bindgen-futures = "0.4"
|
|
web-sys = "0.3.73"
|
|
web-time = "1.1.0" # Timekeeping for native and web
|
|
wgpu = { version = "25.0.0", default-features = false }
|
|
windows-sys = "0.60"
|
|
winit = { version = "0.30.12", default-features = false }
|
|
|
|
[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"
|
|
missing_crate_level_docs = "warn"
|
|
broken_intra_doc_links = "warn"
|
|
|
|
# See also clippy.toml
|
|
[workspace.lints.clippy]
|
|
all = { level = "warn", priority = -1 }
|
|
|
|
allow_attributes = "warn"
|
|
as_ptr_cast_mut = "warn"
|
|
await_holding_lock = "warn"
|
|
bool_to_int_with_if = "warn"
|
|
branches_sharing_code = "warn"
|
|
char_lit_as_u8 = "warn"
|
|
checked_conversions = "warn"
|
|
clear_with_drain = "warn"
|
|
cloned_instead_of_copied = "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_link_with_quotes = "warn"
|
|
doc_markdown = "warn"
|
|
empty_enum = "warn"
|
|
empty_enum_variants_with_brackets = "warn"
|
|
empty_line_after_outer_attr = "warn"
|
|
enum_glob_use = "warn"
|
|
equatable_if_let = "warn"
|
|
exit = "warn"
|
|
expl_impl_clone_on_copy = "warn"
|
|
explicit_deref_methods = "warn"
|
|
explicit_into_iter_loop = "warn"
|
|
explicit_iter_loop = "warn"
|
|
fallible_impl_from = "warn"
|
|
filter_map_next = "warn"
|
|
flat_map_option = "warn"
|
|
float_cmp_const = "warn"
|
|
fn_params_excessive_bools = "warn"
|
|
fn_to_numeric_cast_any = "warn"
|
|
from_iter_instead_of_collect = "warn"
|
|
get_unwrap = "warn"
|
|
if_let_mutex = "warn"
|
|
implicit_clone = "warn"
|
|
implied_bounds_in_impls = "warn"
|
|
imprecise_flops = "warn"
|
|
inconsistent_struct_constructor = "warn"
|
|
index_refutable_slice = "warn"
|
|
inefficient_to_string = "warn"
|
|
infinite_loop = "warn"
|
|
into_iter_without_iter = "warn"
|
|
invalid_upcast_comparisons = "warn"
|
|
iter_filter_is_ok = "warn"
|
|
iter_filter_is_some = "warn"
|
|
iter_not_returning_iterator = "warn"
|
|
iter_on_empty_collections = "warn"
|
|
iter_on_single_items = "warn"
|
|
iter_over_hash_type = "warn"
|
|
iter_without_into_iter = "warn"
|
|
large_digit_groups = "warn"
|
|
large_include_file = "warn"
|
|
large_stack_arrays = "warn"
|
|
large_stack_frames = "warn"
|
|
large_types_passed_by_value = "warn"
|
|
let_unit_value = "warn"
|
|
linkedlist = "warn"
|
|
literal_string_with_formatting_args = "warn"
|
|
lossy_float_literal = "warn"
|
|
macro_use_imports = "warn"
|
|
manual_assert = "warn"
|
|
manual_clamp = "warn"
|
|
manual_instant_elapsed = "warn"
|
|
manual_is_power_of_two = "warn"
|
|
manual_is_variant_and = "warn"
|
|
manual_let_else = "warn"
|
|
manual_ok_or = "warn"
|
|
manual_string_new = "warn"
|
|
map_err_ignore = "warn"
|
|
map_flatten = "warn"
|
|
match_bool = "warn"
|
|
match_on_vec_items = "warn"
|
|
match_same_arms = "warn"
|
|
match_wild_err_arm = "warn"
|
|
match_wildcard_for_single_variants = "warn"
|
|
mem_forget = "warn"
|
|
mismatching_type_param_order = "warn"
|
|
missing_assert_message = "warn"
|
|
missing_enforced_import_renames = "warn"
|
|
missing_errors_doc = "warn"
|
|
missing_safety_doc = "warn"
|
|
mixed_attributes_style = "warn"
|
|
mut_mut = "warn"
|
|
mutex_integer = "warn"
|
|
needless_borrow = "warn"
|
|
needless_continue = "warn"
|
|
needless_for_each = "warn"
|
|
needless_pass_by_ref_mut = "warn"
|
|
needless_pass_by_value = "warn"
|
|
negative_feature_names = "warn"
|
|
non_std_lazy_statics = "warn"
|
|
non_zero_suggestions = "warn"
|
|
nonstandard_macro_braces = "warn"
|
|
option_as_ref_cloned = "warn"
|
|
option_option = "warn"
|
|
path_buf_push_overwrite = "warn"
|
|
pathbuf_init_then_push = "warn"
|
|
precedence_bits = "warn"
|
|
print_stderr = "warn"
|
|
print_stdout = "warn"
|
|
ptr_as_ptr = "warn"
|
|
ptr_cast_constness = "warn"
|
|
pub_underscore_fields = "warn"
|
|
pub_without_shorthand = "warn"
|
|
rc_mutex = "warn"
|
|
readonly_write_lock = "warn"
|
|
redundant_type_annotations = "warn"
|
|
ref_as_ptr = "warn"
|
|
ref_option_ref = "warn"
|
|
ref_patterns = "warn"
|
|
rest_pat_in_fully_bound_structs = "warn"
|
|
return_and_then = "warn"
|
|
same_functions_in_if_condition = "warn"
|
|
semicolon_if_nothing_returned = "warn"
|
|
set_contains_or_insert = "warn"
|
|
single_char_pattern = "warn"
|
|
single_match_else = "warn"
|
|
str_split_at_newline = "warn"
|
|
str_to_string = "warn"
|
|
string_add = "warn"
|
|
string_add_assign = "warn"
|
|
string_lit_as_bytes = "warn"
|
|
string_lit_chars_any = "warn"
|
|
string_to_string = "warn"
|
|
suspicious_command_arg_space = "warn"
|
|
suspicious_xor_used_as_pow = "warn"
|
|
todo = "warn"
|
|
too_long_first_doc_paragraph = "warn"
|
|
trailing_empty_array = "warn"
|
|
trait_duplication_in_bounds = "warn"
|
|
transmute_ptr_to_ptr = "warn"
|
|
tuple_array_conversions = "warn"
|
|
unchecked_duration_subtraction = "warn"
|
|
undocumented_unsafe_blocks = "warn"
|
|
unimplemented = "warn"
|
|
uninhabited_references = "warn"
|
|
uninlined_format_args = "warn"
|
|
unnecessary_box_returns = "warn"
|
|
unnecessary_literal_bound = "warn"
|
|
unnecessary_safety_comment = "warn"
|
|
unnecessary_safety_doc = "warn"
|
|
unnecessary_self_imports = "warn"
|
|
unnecessary_semicolon = "warn"
|
|
unnecessary_struct_initialization = "warn"
|
|
unnecessary_wraps = "warn"
|
|
unnested_or_patterns = "warn"
|
|
unused_peekable = "warn"
|
|
unused_rounding = "warn"
|
|
unused_self = "warn"
|
|
unused_trait_names = "warn"
|
|
use_self = "warn"
|
|
useless_let_if_seq = "warn"
|
|
useless_transmute = "warn"
|
|
verbose_file_reads = "warn"
|
|
wildcard_dependencies = "warn"
|
|
zero_sized_map_values = "warn"
|
|
|
|
# Enable these when we update MSRV:
|
|
# doc_comment_double_space_linebreaks = "warn"
|
|
# elidable_lifetime_names = "warn"
|
|
# ignore_without_reason = "warn"
|
|
# manual_midpoint = "warn" # NOTE `midpoint` is often a lot slower for floats, so we have our own `emath::fast_midpoint` function.
|
|
# single_option_map = "warn"
|
|
# unnecessary_debug_formatting = "warn"
|
|
|
|
|
|
# TODO(emilk): maybe enable more of these lints?
|
|
comparison_chain = "allow"
|
|
should_panic_without_expect = "allow"
|
|
too_many_lines = "allow"
|
|
unwrap_used = "allow" # TODO(emilk): We really wanna warn on this one
|
|
|
|
# These are meh:
|
|
assigning_clones = "allow" # No please
|
|
let_underscore_must_use = "allow"
|
|
let_underscore_untyped = "allow"
|
|
manual_range_contains = "allow" # this one is just worse imho
|
|
map_unwrap_or = "allow" # so is this one
|
|
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
|
|
wildcard_imports = "allow" # `use crate::*` is useful to avoid merge conflicts when adding/removing imports
|