Add `taplo.toml` for toml formatting (#7618)

This commit is contained in:
Emil Ernerfeldt 2025-10-09 15:38:00 +02:00 committed by GitHub
parent 82b6b3c98d
commit d50287b83c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
42 changed files with 185 additions and 257 deletions

View File

@ -3,10 +3,10 @@
# run: typos # run: typos
[default.extend-words] [default.extend-words]
ime = "ime" # Input Method Editor ime = "ime" # Input Method Editor
nknown = "nknown" # part of @55nknown username nknown = "nknown" # part of @55nknown username
ro = "ro" # read-only, also part of the username @Phen-Ro ro = "ro" # read-only, also part of the username @Phen-Ro
typ = "typ" # Often used because `type` is a keyword in Rust typ = "typ" # Often used because `type` is a keyword in Rust
# I mistype these so often # I mistype these so often
tesalator = "tessellator" tesalator = "tessellator"
@ -146,5 +146,5 @@ extend-exclude = ["web_demo/egui_demo_app.js"] # auto-generated
[default] [default]
extend-ignore-re = [ extend-ignore-re = [
"#\\[doc\\(alias = .*", # We suggest "grey" in some doc "#\\[doc\\(alias = .*", # We suggest "grey" in some doc
] ]

View File

@ -1,23 +1,23 @@
[workspace] [workspace]
resolver = "2" resolver = "2"
members = [ members = [
"crates/ecolor", "crates/ecolor",
"crates/egui_demo_app", "crates/egui_demo_app",
"crates/egui_demo_lib", "crates/egui_demo_lib",
"crates/egui_extras", "crates/egui_extras",
"crates/egui_glow", "crates/egui_glow",
"crates/egui_kittest", "crates/egui_kittest",
"crates/egui-wgpu", "crates/egui-wgpu",
"crates/egui-winit", "crates/egui-winit",
"crates/egui", "crates/egui",
"crates/emath", "crates/emath",
"crates/epaint", "crates/epaint",
"crates/epaint_default_fonts", "crates/epaint_default_fonts",
"examples/*", "examples/*",
"tests/*", "tests/*",
"xtask", "xtask",
] ]
[workspace.package] [workspace.package]
@ -73,11 +73,11 @@ accesskit_consumer = "0.30.1"
accesskit_winit = "0.29.1" accesskit_winit = "0.29.1"
ab_glyph = "0.2.32" ab_glyph = "0.2.32"
ahash = { version = "0.8.12", default-features = false, features = [ 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 "no-rng", # we don't need DOS-protection, so we let users opt-in to it instead
"std", "std",
] } ] }
android_logger = "0.15.1" android_logger = "0.15.1"
arboard = { version = "3.6.1", default-features = false} arboard = { version = "3.6.1", default-features = false }
backtrace = "0.3.76" backtrace = "0.3.76"
bitflags = "2.9.4" bitflags = "2.9.4"
bytemuck = "1.24.0" bytemuck = "1.24.0"
@ -125,7 +125,7 @@ ron = "0.11.0"
serde = { version = "1.0.228", features = ["derive"] } serde = { version = "1.0.228", features = ["derive"] }
similar-asserts = "1.7.0" similar-asserts = "1.7.0"
smallvec = "1.15.1" smallvec = "1.15.1"
smithay-clipboard = "0.7.2" smithay-clipboard = "0.7.2"
static_assertions = "1.1.0" static_assertions = "1.1.0"
syntect = { version = "5.3.0", default-features = false } syntect = { version = "5.3.0", default-features = false }
tempfile = "3.23.0" tempfile = "3.23.0"
@ -134,7 +134,7 @@ tokio = "1.47.1"
type-map = "0.5.1" type-map = "0.5.1"
unicode_names2 = { version = "2.0.0", default-features = false } unicode_names2 = { version = "2.0.0", default-features = false }
unicode-segmentation = "1.12.0" unicode-segmentation = "1.12.0"
wasm-bindgen = "0.2.100" # Keep wasm-bindgen version in sync in: setup_web.sh, Cargo.toml, Cargo.lock, rust.yml wasm-bindgen = "0.2.100" # Keep wasm-bindgen version in sync in: setup_web.sh, Cargo.toml, Cargo.lock, rust.yml
wasm-bindgen-futures = "0.4.0" wasm-bindgen-futures = "0.4.0"
wayland-cursor = { version = "0.31.11", default-features = false } wayland-cursor = { version = "0.31.11", default-features = false }
web-sys = "0.3.77" web-sys = "0.3.77"
@ -156,7 +156,7 @@ rust_2021_prelude_collisions = "warn"
semicolon_in_expressions_from_macros = "warn" semicolon_in_expressions_from_macros = "warn"
trivial_numeric_casts = "warn" trivial_numeric_casts = "warn"
unexpected_cfgs = "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 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_extern_crates = "warn"
unused_import_braces = "warn" unused_import_braces = "warn"
unused_lifetimes = "warn" unused_lifetimes = "warn"
@ -186,11 +186,11 @@ dbg_macro = "warn"
debug_assert_with_mut_call = "warn" debug_assert_with_mut_call = "warn"
default_union_representation = "warn" default_union_representation = "warn"
derive_partial_eq_without_eq = "warn" derive_partial_eq_without_eq = "warn"
disallowed_macros = "warn" # See clippy.toml disallowed_macros = "warn" # See clippy.toml
disallowed_methods = "warn" # See clippy.toml disallowed_methods = "warn" # See clippy.toml
disallowed_names = "warn" # See clippy.toml disallowed_names = "warn" # See clippy.toml
disallowed_script_idents = "warn" # See clippy.toml disallowed_script_idents = "warn" # See clippy.toml
disallowed_types = "warn" # See clippy.toml disallowed_types = "warn" # See clippy.toml
doc_comment_double_space_linebreaks = "warn" doc_comment_double_space_linebreaks = "warn"
doc_link_with_quotes = "warn" doc_link_with_quotes = "warn"
doc_markdown = "warn" doc_markdown = "warn"
@ -345,14 +345,14 @@ zero_sized_map_values = "warn"
comparison_chain = "allow" comparison_chain = "allow"
should_panic_without_expect = "allow" should_panic_without_expect = "allow"
too_many_lines = "allow" too_many_lines = "allow"
unwrap_used = "allow" # TODO(emilk): We really wanna warn on this one unwrap_used = "allow" # TODO(emilk): We really wanna warn on this one
# These are meh: # These are meh:
assigning_clones = "allow" # No please assigning_clones = "allow" # No please
let_underscore_must_use = "allow" let_underscore_must_use = "allow"
let_underscore_untyped = "allow" let_underscore_untyped = "allow"
manual_range_contains = "allow" # this one is just worse imho manual_range_contains = "allow" # this one is just worse imho
map_unwrap_or = "allow" # so is this one 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 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 significant_drop_tightening = "allow" # Too many false positives
wildcard_imports = "allow" # `use crate::*` is useful to avoid merge conflicts when adding/removing imports wildcard_imports = "allow" # `use crate::*` is useful to avoid merge conflicts when adding/removing imports

View File

@ -23,25 +23,25 @@ type-complexity-threshold = 350
# https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros # https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_macros
disallowed-macros = [ disallowed-macros = [
'std::dbg', 'std::dbg',
'std::unimplemented', 'std::unimplemented',
# TODO(emilk): consider forbidding these to encourage the use of proper log stream, and then explicitly allow legitimate uses # TODO(emilk): consider forbidding these to encourage the use of proper log stream, and then explicitly allow legitimate uses
# 'std::eprint', # 'std::eprint',
# 'std::eprintln', # 'std::eprintln',
# 'std::print', # 'std::print',
# 'std::println', # 'std::println',
] ]
# https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods # https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods
disallowed-methods = [ disallowed-methods = [
# NOTE: There are many things that aren't allowed on wasm, # NOTE: There are many things that aren't allowed on wasm,
# but we cannot disable them all here (because of e.g. https://github.com/rust-lang/rust-clippy/issues/10406) # but we cannot disable them all here (because of e.g. https://github.com/rust-lang/rust-clippy/issues/10406)
# so we do that in `clipppy_wasm.toml` instead. # so we do that in `clipppy_wasm.toml` instead.
{ path = "std::env::temp_dir", readon = "Use the tempfile crate instead" }, { path = "std::env::temp_dir", readon = "Use the tempfile crate instead" },
{ path = "std::panic::catch_unwind", reason = "We compile with `panic = abort" }, { path = "std::panic::catch_unwind", reason = "We compile with `panic = abort" },
{ path = "std::thread::spawn", readon = "Use `std::thread::Builder` and name the thread" }, { path = "std::thread::spawn", readon = "Use `std::thread::Builder` and name the thread" },
] ]
# https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names # https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names
@ -49,24 +49,24 @@ disallowed-names = []
# https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_types # https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_types
disallowed-types = [ disallowed-types = [
{ path = "std::sync::Condvar", reason = "Use parking_lot instead" }, { path = "std::sync::Condvar", reason = "Use parking_lot instead" },
{ path = "std::sync::Mutex", reason = "Use epaint::mutex instead" }, { path = "std::sync::Mutex", reason = "Use epaint::mutex instead" },
{ path = "std::sync::RwLock", reason = "Use epaint::mutex instead" }, { path = "std::sync::RwLock", reason = "Use epaint::mutex instead" },
{ path = "winit::dpi::LogicalPosition", reason = "We do our own pixels<->point conversion, taking `egui_ctx.zoom_factor` into account" }, { path = "winit::dpi::LogicalPosition", reason = "We do our own pixels<->point conversion, taking `egui_ctx.zoom_factor` into account" },
{ path = "winit::dpi::LogicalSize", reason = "We do our own pixels<->point conversion, taking `egui_ctx.zoom_factor` into account" }, { path = "winit::dpi::LogicalSize", reason = "We do our own pixels<->point conversion, taking `egui_ctx.zoom_factor` into account" },
# "std::sync::Once", # enabled for now as the `log_once` macro uses it internally # "std::sync::Once", # enabled for now as the `log_once` macro uses it internally
] ]
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Allow-list of words for markdown in docstrings https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown # Allow-list of words for markdown in docstrings https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
doc-valid-idents = [ doc-valid-idents = [
# You must also update the same list in `scripts/clippy_wasm/clippy.toml`! # You must also update the same list in `scripts/clippy_wasm/clippy.toml`!
"AccessKit", "AccessKit",
"WebGL", "WebGL",
"WebGL1", "WebGL1",
"WebGL2", "WebGL2",
"WebGPU", "WebGPU",
"VirtualBox", "VirtualBox",
"..", "..",
] ]

View File

@ -1,10 +1,7 @@
[package] [package]
name = "ecolor" name = "ecolor"
version.workspace = true version.workspace = true
authors = [ authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>", "Andreas Reich <reichandreas@gmx.de>"]
"Emil Ernerfeldt <emil.ernerfeldt@gmail.com>",
"Andreas Reich <reichandreas@gmx.de>",
]
description = "Color structs and color conversion utilities" description = "Color structs and color conversion utilities"
edition.workspace = true edition.workspace = true
rust-version.workspace = true rust-version.workspace = true

View File

@ -11,13 +11,7 @@ readme = "README.md"
repository = "https://github.com/emilk/egui/tree/main/crates/eframe" repository = "https://github.com/emilk/egui/tree/main/crates/eframe"
categories = ["gui", "game-development"] categories = ["gui", "game-development"]
keywords = ["egui", "gui", "gamedev"] keywords = ["egui", "gui", "gamedev"]
include = [ include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "Cargo.toml", "data/icon.png"]
"../LICENSE-APACHE",
"../LICENSE-MIT",
"**/*.rs",
"Cargo.toml",
"data/icon.png",
]
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
@ -35,7 +29,7 @@ default = [
"accesskit", "accesskit",
"default_fonts", "default_fonts",
"glow", "glow",
"wayland", # Required for Linux support (including CI!) "wayland", # Required for Linux support (including CI!)
"web_screen_reader", "web_screen_reader",
"winit/default", "winit/default",
"x11", "x11",
@ -66,13 +60,7 @@ default_fonts = ["egui/default_fonts"]
glow = ["dep:egui_glow", "dep:glow", "dep:glutin-winit", "dep:glutin"] glow = ["dep:egui_glow", "dep:glow", "dep:glutin-winit", "dep:glutin"]
## Enable saving app state to disk. ## Enable saving app state to disk.
persistence = [ persistence = ["dep:home", "egui-winit/serde", "egui/persistence", "ron", "serde"]
"dep:home",
"egui-winit/serde",
"egui/persistence",
"ron",
"serde",
]
## Enables wayland support and fixes clipboard issue. ## Enables wayland support and fixes clipboard issue.
## ##
@ -88,10 +76,7 @@ wayland = [
## Enable screen reader support (requires `ctx.options_mut(|o| o.screen_reader = true);`) on web. ## Enable screen reader support (requires `ctx.options_mut(|o| o.screen_reader = true);`) on web.
## ##
## For other platforms, use the `accesskit` feature instead. ## For other platforms, use the `accesskit` feature instead.
web_screen_reader = [ web_screen_reader = ["web-sys/SpeechSynthesis", "web-sys/SpeechSynthesisUtterance"]
"web-sys/SpeechSynthesis",
"web-sys/SpeechSynthesisUtterance",
]
## Use [`wgpu`](https://docs.rs/wgpu) for painting (via [`egui-wgpu`](https://github.com/emilk/egui/tree/main/crates/egui-wgpu)). ## Use [`wgpu`](https://docs.rs/wgpu) for painting (via [`egui-wgpu`](https://github.com/emilk/egui/tree/main/crates/egui-wgpu)).
## ##
@ -145,10 +130,7 @@ serde = { workspace = true, optional = true }
# ------------------------------------------- # -------------------------------------------
# native: # native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
egui-winit = { workspace = true, default-features = false, features = [ egui-winit = { workspace = true, default-features = false, features = ["clipboard", "links"] }
"clipboard",
"links",
] }
image = { workspace = true, features = ["png"] } # Needed for app icon image = { workspace = true, features = ["png"] } # Needed for app icon
winit = { workspace = true, default-features = false, features = ["rwh_06"] } winit = { workspace = true, default-features = false, features = ["rwh_06"] }
@ -158,10 +140,7 @@ egui-wgpu = { workspace = true, optional = true, features = [
] } # if wgpu is used, use it with winit ] } # if wgpu is used, use it with winit
pollster = { workspace = true, optional = true } # needed for wgpu pollster = { workspace = true, optional = true } # needed for wgpu
glutin = { workspace = true, optional = true, default-features = false, features = [ glutin = { workspace = true, optional = true, default-features = false, features = ["egl", "wgl"] }
"egl",
"wgl",
] }
glutin-winit = { workspace = true, optional = true, default-features = false, features = [ glutin-winit = { workspace = true, optional = true, default-features = false, features = [
"egl", "egl",
"wgl", "wgl",

View File

@ -15,13 +15,7 @@ readme = "README.md"
repository = "https://github.com/emilk/egui/tree/main/crates/egui-wgpu" repository = "https://github.com/emilk/egui/tree/main/crates/egui-wgpu"
categories = ["gui", "game-development"] categories = ["gui", "game-development"]
keywords = ["wgpu", "egui", "gui", "gamedev"] keywords = ["wgpu", "egui", "gui", "gamedev"]
include = [ include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "**/*.wgsl", "Cargo.toml"]
"../LICENSE-APACHE",
"../LICENSE-MIT",
"**/*.rs",
"**/*.wgsl",
"Cargo.toml",
]
[lints] [lints]
workspace = true workspace = true

View File

@ -100,6 +100,4 @@ smithay-clipboard = { workspace = true, optional = true }
wayland-cursor = { workspace = true, optional = true } wayland-cursor = { workspace = true, optional = true }
[target.'cfg(not(target_os = "android"))'.dependencies] [target.'cfg(not(target_os = "android"))'.dependencies]
arboard = { workspace = true, optional = true, features = [ arboard = { workspace = true, optional = true, features = ["image-data"] }
"image-data",
] }

View File

@ -31,12 +31,7 @@ web_app = ["http", "persistence"]
accessibility_inspector = ["dep:accesskit", "dep:accesskit_consumer", "eframe/accesskit"] accessibility_inspector = ["dep:accesskit", "dep:accesskit_consumer", "eframe/accesskit"]
http = ["ehttp", "image/jpeg", "poll-promise", "egui_extras/image"] http = ["ehttp", "image/jpeg", "poll-promise", "egui_extras/image"]
image_viewer = ["image/jpeg", "egui_extras/all_loaders", "rfd"] image_viewer = ["image/jpeg", "egui_extras/all_loaders", "rfd"]
persistence = [ persistence = ["eframe/persistence", "egui_extras/serde", "egui/persistence", "serde"]
"eframe/persistence",
"egui_extras/serde",
"egui/persistence",
"serde",
]
puffin = ["dep:puffin", "dep:puffin_http", "profiling/profile-with-puffin"] puffin = ["dep:puffin", "dep:puffin_http", "profiling/profile-with-puffin"]
serde = ["dep:serde", "egui_demo_lib/serde", "egui/serde"] serde = ["dep:serde", "egui_demo_lib/serde", "egui/serde"]
syntect = ["egui_demo_lib/syntect"] syntect = ["egui_demo_lib/syntect"]
@ -48,9 +43,7 @@ x11 = ["eframe/x11"]
[dependencies] [dependencies]
chrono = { workspace = true, features = ["js-sys", "wasmbind"] } chrono = { workspace = true, features = ["js-sys", "wasmbind"] }
eframe = { workspace = true, default-features = false, features = [ eframe = { workspace = true, default-features = false, features = ["web_screen_reader"] }
"web_screen_reader",
] }
egui = { workspace = true, features = ["callstack", "default"] } egui = { workspace = true, features = ["callstack", "default"] }
egui_demo_lib = { workspace = true, features = ["default", "chrono"] } egui_demo_lib = { workspace = true, features = ["default", "chrono"] }
egui_extras = { workspace = true, features = ["default", "image"] } egui_extras = { workspace = true, features = ["default", "image"] }
@ -69,11 +62,7 @@ puffin = { workspace = true, optional = true }
puffin_http = { workspace = true, optional = true } puffin_http = { workspace = true, optional = true }
# Enable both WebGL & WebGPU when targeting the web (these features have no effect when not targeting wasm32) # Enable both WebGL & WebGPU when targeting the web (these features have no effect when not targeting wasm32)
# Also enable the default features so we have a supported backend for every platform. # Also enable the default features so we have a supported backend for every platform.
wgpu = { workspace = true, features = [ wgpu = { workspace = true, features = ["default", "webgpu", "webgl"], optional = true }
"default",
"webgpu",
"webgl",
], optional = true }
# feature "http": # feature "http":

View File

@ -11,13 +11,7 @@ readme = "README.md"
repository = "https://github.com/emilk/egui/tree/main/crates/egui_demo_lib" repository = "https://github.com/emilk/egui/tree/main/crates/egui_demo_lib"
categories = ["gui", "graphics"] categories = ["gui", "graphics"]
keywords = ["glow", "egui", "gui", "gamedev"] keywords = ["glow", "egui", "gui", "gamedev"]
include = [ include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "Cargo.toml", "data/*"]
"../LICENSE-APACHE",
"../LICENSE-MIT",
"**/*.rs",
"Cargo.toml",
"data/*",
]
[lints] [lints]
workspace = true workspace = true
@ -60,7 +54,7 @@ egui = { workspace = true, features = ["default_fonts"] }
egui_extras = { workspace = true, features = ["image", "svg"] } egui_extras = { workspace = true, features = ["image", "svg"] }
egui_kittest = { workspace = true, features = ["wgpu", "snapshot"] } egui_kittest = { workspace = true, features = ["wgpu", "snapshot"] }
image = { workspace = true, features = ["png"] } image = { workspace = true, features = ["png"] }
mimalloc.workspace = true # for benchmarks mimalloc.workspace = true # for benchmarks
rand.workspace = true rand.workspace = true
[[bench]] [[bench]]

View File

@ -83,12 +83,7 @@ profiling.workspace = true
serde = { workspace = true, optional = true } serde = { workspace = true, optional = true }
# Date operations needed for datepicker widget # Date operations needed for datepicker widget
chrono = { workspace = true, optional = true, features = [ chrono = { workspace = true, optional = true, features = ["clock", "js-sys", "std", "wasmbind"] }
"clock",
"js-sys",
"std",
"wasmbind",
] }
## Enable this when generating docs. ## Enable this when generating docs.
document-features = { workspace = true, optional = true } document-features = { workspace = true, optional = true }

View File

@ -11,13 +11,7 @@ readme = "README.md"
repository = "https://github.com/emilk/egui/tree/main/crates/egui_glow" repository = "https://github.com/emilk/egui/tree/main/crates/egui_glow"
categories = ["gui", "game-development"] categories = ["gui", "game-development"]
keywords = ["glow", "egui", "gui", "gamedev"] keywords = ["glow", "egui", "gui", "gamedev"]
include = [ include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "Cargo.toml", "src/shader/*.glsl"]
"../LICENSE-APACHE",
"../LICENSE-MIT",
"**/*.rs",
"Cargo.toml",
"src/shader/*.glsl",
]
[lints] [lints]
workspace = true workspace = true
@ -73,7 +67,7 @@ wasm-bindgen.workspace = true
[dev-dependencies] [dev-dependencies]
glutin = { workspace = true, default-features = true } # examples/pure_glow glutin = { workspace = true, default-features = true } # examples/pure_glow
glutin-winit = { workspace = true, default-features = true } glutin-winit = { workspace = true, default-features = true }
[[example]] [[example]]

View File

@ -1,10 +1,7 @@
[package] [package]
name = "egui_kittest" name = "egui_kittest"
version.workspace = true version.workspace = true
authors = [ authors = ["Lucas Meurer <lucasmeurer96@gmail.com>", "Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
"Lucas Meurer <lucasmeurer96@gmail.com>",
"Emil Ernerfeldt <emil.ernerfeldt@gmail.com>",
]
description = "Testing library for egui based on kittest and AccessKit" description = "Testing library for egui based on kittest and AccessKit"
edition.workspace = true edition.workspace = true
rust-version.workspace = true rust-version.workspace = true
@ -24,13 +21,7 @@ rustdoc-args = ["--generate-link-to-definition"]
[features] [features]
## Adds a wgpu-based test renderer. ## Adds a wgpu-based test renderer.
wgpu = [ wgpu = ["dep:egui-wgpu", "dep:pollster", "dep:image", "dep:wgpu", "eframe?/wgpu"]
"dep:egui-wgpu",
"dep:pollster",
"dep:image",
"dep:wgpu",
"eframe?/wgpu",
]
## Adds a dify-based image snapshot utility. ## Adds a dify-based image snapshot utility.
snapshot = ["dep:dify", "dep:image", "dep:open", "dep:tempfile", "image/png"] snapshot = ["dep:dify", "dep:image", "dep:open", "dep:tempfile", "image/png"]
@ -52,12 +43,7 @@ egui-wgpu = { workspace = true, optional = true }
pollster = { workspace = true, optional = true } pollster = { workspace = true, optional = true }
image = { workspace = true, optional = true } image = { workspace = true, optional = true }
# Enable DX12 because it always comes with a software rasterizer. # Enable DX12 because it always comes with a software rasterizer.
wgpu = { workspace = true, features = [ wgpu = { workspace = true, features = ["metal", "dx12", "vulkan", "gles"], optional = true }
"metal",
"dx12",
"vulkan",
"gles",
], optional = true }
# snapshot dependencies # snapshot dependencies
dify = { workspace = true, optional = true } dify = { workspace = true, optional = true }

View File

@ -11,12 +11,7 @@ readme = "README.md"
repository = "https://github.com/emilk/egui/tree/main/crates/epaint" repository = "https://github.com/emilk/egui/tree/main/crates/epaint"
categories = ["graphics", "gui"] categories = ["graphics", "gui"]
keywords = ["graphics", "gui", "egui"] keywords = ["graphics", "gui", "egui"]
include = [ include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "Cargo.toml"]
"../LICENSE-APACHE",
"../LICENSE-MIT",
"**/*.rs",
"Cargo.toml"
]
[lints] [lints]
workspace = true workspace = true
@ -70,8 +65,8 @@ ab_glyph.workspace = true
ahash.workspace = true ahash.workspace = true
log.workspace = true log.workspace = true
nohash-hasher.workspace = true nohash-hasher.workspace = true
parking_lot.workspace = true # Using parking_lot over std::sync::Mutex gives 50% speedups in some real-world scenarios. parking_lot.workspace = true # Using parking_lot over std::sync::Mutex gives 50% speedups in some real-world scenarios.
profiling = { workspace = true} profiling = { workspace = true }
#! ### Optional dependencies #! ### Optional dependencies
bytemuck = { workspace = true, optional = true, features = ["derive"] } bytemuck = { workspace = true, optional = true, features = ["derive"] }

View File

@ -45,24 +45,24 @@ deny = [
] ]
skip = [ skip = [
{ name = "bit-set" }, # wgpu's naga depends on 0.8, syntect's (used by egui_extras) fancy-regex depends on 0.5 { name = "bit-set" }, # wgpu's naga depends on 0.8, syntect's (used by egui_extras) fancy-regex depends on 0.5
{ name = "bit-vec" }, # dependency of bit-set in turn, different between 0.6 and 0.5 { name = "bit-vec" }, # dependency of bit-set in turn, different between 0.6 and 0.5
{ name = "bitflags" }, # old 1.0 version via glutin, png, spirv, … { name = "bitflags" }, # old 1.0 version via glutin, png, spirv, …
{ name = "core-foundation" }, # version conflict between winit and wgpu ecosystems { name = "core-foundation" }, # version conflict between winit and wgpu ecosystems
{ name = "core-graphics-types" }, # version conflict between winit and wgpu ecosystems { name = "core-graphics-types" }, # version conflict between winit and wgpu ecosystems
{ name = "getrandom" }, # ring / rustls (and thus ehttp) still depend on getrandom 0.2 { name = "getrandom" }, # ring / rustls (and thus ehttp) still depend on getrandom 0.2
{ name = "quick-xml" }, # old version via wayland-scanner { name = "quick-xml" }, # old version via wayland-scanner
{ name = "redox_syscall" }, # old version via winit { name = "redox_syscall" }, # old version via winit
{ name = "rustc-hash" }, # Small enough { name = "rustc-hash" }, # Small enough
{ name = "thiserror" }, # ecosystem is in the process of migrating from 1.x to 2.x { name = "thiserror" }, # ecosystem is in the process of migrating from 1.x to 2.x
{ name = "thiserror-impl" }, # same as above { name = "thiserror-impl" }, # same as above
{ name = "windows-sys" }, # mostly hopeless to avoid { name = "windows-sys" }, # mostly hopeless to avoid
{ name = "zerocopy" }, # Small enough { name = "zerocopy" }, # Small enough
] ]
skip-tree = [ skip-tree = [
{ name = "hashbrown" }, # wgpu's naga depends on 0.16, accesskit depends on 0.15 { name = "hashbrown" }, # wgpu's naga depends on 0.16, accesskit depends on 0.15
{ name = "rfd" }, # example dependency { name = "rfd" }, # example dependency
{ name = "windows" }, # the ecosystem is currently transitioning from 0.58 to 0.61 { name = "windows" }, # the ecosystem is currently transitioning from 0.58 to 0.61
] ]
@ -72,21 +72,21 @@ private = { ignore = true }
confidence-threshold = 0.93 # We want really high confidence when inferring licenses from text confidence-threshold = 0.93 # We want really high confidence when inferring licenses from text
allow = [ allow = [
"Apache-2.0 WITH LLVM-exception", # https://spdx.org/licenses/LLVM-exception.html "Apache-2.0 WITH LLVM-exception", # https://spdx.org/licenses/LLVM-exception.html
"Apache-2.0", # https://tldrlegal.com/license/apache-license-2.0-(apache-2.0) "Apache-2.0", # https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)
"BSD-2-Clause", # https://tldrlegal.com/license/bsd-2-clause-license-(freebsd) "BSD-2-Clause", # https://tldrlegal.com/license/bsd-2-clause-license-(freebsd)
"BSD-3-Clause", # https://tldrlegal.com/license/bsd-3-clause-license-(revised) "BSD-3-Clause", # https://tldrlegal.com/license/bsd-3-clause-license-(revised)
"BSL-1.0", # https://tldrlegal.com/license/boost-software-license-1.0-explained "BSL-1.0", # https://tldrlegal.com/license/boost-software-license-1.0-explained
"CC0-1.0", # https://creativecommons.org/publicdomain/zero/1.0/ "CC0-1.0", # https://creativecommons.org/publicdomain/zero/1.0/
"ISC", # https://www.tldrlegal.com/license/isc-license "ISC", # https://www.tldrlegal.com/license/isc-license
"MIT-0", # https://choosealicense.com/licenses/mit-0/ "MIT-0", # https://choosealicense.com/licenses/mit-0/
"MIT", # https://tldrlegal.com/license/mit-license "MIT", # https://tldrlegal.com/license/mit-license
"MPL-2.0", # https://www.mozilla.org/en-US/MPL/2.0/FAQ/ - see Q11. Used by webpki-roots on Linux. "MPL-2.0", # https://www.mozilla.org/en-US/MPL/2.0/FAQ/ - see Q11. Used by webpki-roots on Linux.
"OFL-1.1", # https://spdx.org/licenses/OFL-1.1.html "OFL-1.1", # https://spdx.org/licenses/OFL-1.1.html
"OpenSSL", # https://www.openssl.org/source/license.html - used on Linux "OpenSSL", # https://www.openssl.org/source/license.html - used on Linux
"Ubuntu-font-1.0", # https://ubuntu.com/legal/font-licence "Ubuntu-font-1.0", # https://ubuntu.com/legal/font-licence
"Unicode-3.0", # https://www.unicode.org/license.txt "Unicode-3.0", # https://www.unicode.org/license.txt
"Unicode-DFS-2016", # https://spdx.org/licenses/Unicode-DFS-2016.html "Unicode-DFS-2016", # https://spdx.org/licenses/Unicode-DFS-2016.html
"Zlib", # https://tldrlegal.com/license/zlib-libpng-license-(zlib) "Zlib", # https://tldrlegal.com/license/zlib-libpng-license-(zlib)
] ]
exceptions = [] exceptions = []

View File

@ -13,7 +13,7 @@ workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }

View File

@ -13,7 +13,7 @@ workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }

View File

@ -13,7 +13,7 @@ workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }

View File

@ -13,7 +13,7 @@ workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }

View File

@ -13,8 +13,8 @@ workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
# For image support: # For image support:

View File

@ -16,8 +16,8 @@ ignored = ["image"] # We need the .png feature
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }
egui_demo_lib.workspace = true egui_demo_lib.workspace = true

View File

@ -13,7 +13,7 @@ workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }

View File

@ -13,8 +13,8 @@ workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }

View File

@ -19,8 +19,8 @@ required-features = ["linux-example"]
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }

View File

@ -13,8 +13,8 @@ workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }
rfd.workspace = true rfd.workspace = true

View File

@ -18,9 +18,9 @@ crate-type = ["cdylib", "lib"]
[dependencies] [dependencies]
eframe = { workspace = true, default-features = false, features = [ eframe = { workspace = true, default-features = false, features = [
"default_fonts", "default_fonts",
"glow", "glow",
"android-native-activity", "android-native-activity",
] } ] }
egui_demo_lib = { workspace = true, features = ["chrono"] } egui_demo_lib = { workspace = true, features = ["chrono"] }

View File

@ -13,8 +13,8 @@ workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
# For image support: # For image support:

View File

@ -17,11 +17,11 @@ ignored = ["winit"] # Just enable some features of it; see below
[dependencies] [dependencies]
eframe = { workspace = true, default-features = false, features = [ eframe = { workspace = true, default-features = false, features = [
# accesskit struggles with threading # accesskit struggles with threading
"default_fonts", "default_fonts",
"wayland", "wayland",
"x11", "x11",
"wgpu", "wgpu",
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }
# This is normally enabled by eframe/default, which is not being used here # This is normally enabled by eframe/default, which is not being used here

View File

@ -13,7 +13,7 @@ workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }

View File

@ -13,7 +13,7 @@ workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }

View File

@ -15,7 +15,7 @@ wgpu = ["eframe/wgpu"]
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }

View File

@ -9,8 +9,8 @@ version.workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }

View File

@ -20,8 +20,8 @@ wgpu = ["eframe/wgpu"]
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }
log.workspace = true log.workspace = true

View File

@ -1,10 +1,7 @@
[package] [package]
name = "screenshot" name = "screenshot"
version = "0.1.0" version = "0.1.0"
authors = [ authors = ["René Rössler <rene@freshx.de>", "Andreas Faber <andreas.mfaber@gmail.com"]
"René Rössler <rene@freshx.de>",
"Andreas Faber <andreas.mfaber@gmail.com",
]
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
edition = "2024" edition = "2024"
rust-version = "1.88" rust-version = "1.88"
@ -16,9 +13,9 @@ workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
"wgpu", "wgpu",
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }
image = { workspace = true, features = ["png"] } image = { workspace = true, features = ["png"] }

View File

@ -13,8 +13,8 @@ workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }
log.workspace = true log.workspace = true

View File

@ -12,7 +12,7 @@ workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }

View File

@ -36,7 +36,7 @@ retry_wait_time = 2
accept = [ accept = [
"100..=103", # Informational codes. "100..=103", # Informational codes.
"200..=299", # Success codes. "200..=299", # Success codes.
"429", # Too many requests. This is practically never a sign of a broken link. "429", # Too many requests. This is practically never a sign of a broken link.
] ]
# Exclude URLs and mail addresses from checking (supports regex). # Exclude URLs and mail addresses from checking (supports regex).

13
taplo.toml Normal file
View File

@ -0,0 +1,13 @@
# https://github.com/tamasfe/taplo
include = [
"*.toml",
"crates/**/*.toml",
"examples/**/*.toml",
"scripts/**/*.toml",
"tests/**/*.toml",
]
[formatting]
align_comments = false # causes unnecessary churn
column_width = 100

View File

@ -8,7 +8,7 @@ version.workspace = true
[dev-dependencies] [dev-dependencies]
egui = { workspace = true, default-features = true } egui = { workspace = true, default-features = true }
egui_kittest = { workspace = true, features = ["snapshot", "wgpu"] } egui_kittest = { workspace = true, features = ["snapshot", "wgpu"] }
egui_extras = { workspace = true, features = ["image"]} egui_extras = { workspace = true, features = ["image"] }
image = { workspace = true, features = ["png"] } image = { workspace = true, features = ["png"] }
[lints] [lints]

View File

@ -10,10 +10,7 @@ publish = false
workspace = true workspace = true
[package.metadata.cargo-machete] [package.metadata.cargo-machete]
ignored = [ ignored = ["eframe", "egui_extras"] # We don't use them, just check that things compile
"eframe",
"egui_extras",
] # We don't use them, just check that things compile
[dependencies] [dependencies]
eframe = { workspace = true, features = ["default", "persistence"] } eframe = { workspace = true, features = ["default", "persistence"] }

View File

@ -14,7 +14,7 @@ workspace = true
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }

View File

@ -15,7 +15,7 @@ wgpu = ["eframe/wgpu"]
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }

View File

@ -15,7 +15,7 @@ wgpu = ["eframe/wgpu"]
[dependencies] [dependencies]
eframe = { workspace = true, features = [ eframe = { workspace = true, features = [
"default", "default",
"__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO
] } ] }
env_logger = { workspace = true, features = ["auto-color", "humantime"] } env_logger = { workspace = true, features = ["auto-color", "humantime"] }