From 4cf4781d7391b656c76700ec6b79b60878712106 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 5 Feb 2024 12:45:41 +0100 Subject: [PATCH] Put all egui crates as workspace crates --- Cargo.toml | 12 ++++++++++++ crates/eframe/Cargo.toml | 10 +++++----- crates/egui-wgpu/Cargo.toml | 8 ++++---- crates/egui-winit/Cargo.toml | 4 +--- crates/egui/Cargo.toml | 2 +- crates/egui_demo_app/Cargo.toml | 13 +++++-------- crates/egui_demo_lib/Cargo.toml | 9 +++++---- crates/egui_extras/Cargo.toml | 5 ++--- crates/egui_glow/Cargo.toml | 6 ++---- crates/egui_plot/Cargo.toml | 2 +- crates/epaint/Cargo.toml | 4 ++-- examples/confirm_exit/Cargo.toml | 3 ++- examples/custom_3d_glow/Cargo.toml | 3 ++- examples/custom_font/Cargo.toml | 3 ++- examples/custom_font_style/Cargo.toml | 3 ++- examples/custom_plot_manipulation/Cargo.toml | 5 +++-- examples/custom_window_frame/Cargo.toml | 3 ++- examples/file_dialog/Cargo.toml | 3 ++- examples/hello_world/Cargo.toml | 5 +++-- examples/hello_world_par/Cargo.toml | 2 +- examples/hello_world_simple/Cargo.toml | 3 ++- examples/images/Cargo.toml | 5 +++-- examples/keyboard_events/Cargo.toml | 3 ++- examples/multiple_viewports/Cargo.toml | 3 ++- examples/puffin_profiler/Cargo.toml | 3 ++- examples/save_plot/Cargo.toml | 5 +++-- examples/screenshot/Cargo.toml | 3 ++- examples/serial_windows/Cargo.toml | 3 ++- examples/test_inline_glow_paint/Cargo.toml | 2 +- examples/test_viewports/Cargo.toml | 3 ++- examples/user_attention/Cargo.toml | 3 ++- 31 files changed, 82 insertions(+), 59 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 70c284b1587..d6d8f8ca437 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,6 +48,18 @@ opt-level = 2 [workspace.dependencies] +emath = { version = "0.25.0", path = "crates/emath", default-features = false } +ecolor = { version = "0.25.0", path = "crates/ecolor", default-features = false } +epaint = { version = "0.25.0", path = "crates/epaint", default-features = false } +egui = { version = "0.25.0", path = "crates/egui", default-features = false } +egui_plot = { version = "0.25.0", path = "crates/egui_plot", default-features = false } +egui-winit = { version = "0.25.0", path = "crates/egui-winit", default-features = false } +egui_extras = { version = "0.25.0", path = "crates/egui_extras", default-features = false } +egui-wgpu = { version = "0.25.0", path = "crates/egui-wgpu", default-features = false } +egui_demo_lib = { version = "0.25.0", path = "crates/egui_demo_lib", default-features = false } +egui_glow = { version = "0.25.0", path = "crates/egui_glow", default-features = false } +eframe = { version = "0.25.0", path = "crates/eframe", default-features = false } + #TODO(emilk): make more things workspace dependencies ahash = { version = "0.8.6", default-features = false, features = [ "no-rng", # we don't need DOS-protection, so we let users opt-in to it instead diff --git a/crates/eframe/Cargo.toml b/crates/eframe/Cargo.toml index 92a87d7a65d..27d7994edf3 100644 --- a/crates/eframe/Cargo.toml +++ b/crates/eframe/Cargo.toml @@ -121,7 +121,7 @@ x11 = ["egui-winit/x11", "egui-wgpu?/x11", "egui_glow?/x11"] __screenshot = [] [dependencies] -egui = { version = "0.25.0", path = "../egui", default-features = false, features = [ +egui = { workspace = true, default-features = false, features = [ "bytemuck", "log", ] } @@ -136,7 +136,7 @@ web-time.workspace = true # Optional dependencies -egui_glow = { version = "0.25.0", path = "../egui_glow", optional = true, default-features = false } +egui_glow = { workspace = true, optional = true, default-features = false } glow = { workspace = true, optional = true } # glutin stuck on old version of raw-window-handle: rwh_05 = { package = "raw-window-handle", version = "0.5.2", optional = true, features = [ @@ -148,7 +148,7 @@ serde = { version = "1", optional = true, features = ["derive"] } # ------------------------------------------- # native: [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -egui-winit = { version = "0.25.0", path = "../egui-winit", default-features = false, features = [ +egui-winit = { workspace = true, default-features = false, features = [ "clipboard", "links", ] } @@ -159,7 +159,7 @@ winit = { workspace = true, default-features = false, features = ["rwh_06"] } # optional native: directories-next = { version = "2", optional = true } -egui-wgpu = { version = "0.25.0", path = "../egui-wgpu", optional = true, features = [ +egui-wgpu = { workspace = true, optional = true, features = [ "winit", ] } # if wgpu is used, use it with winit pollster = { version = "0.3", optional = true } # needed for wgpu @@ -238,5 +238,5 @@ web-sys = { version = "0.3.58", features = [ ] } # optional web: -egui-wgpu = { version = "0.25.0", path = "../egui-wgpu", optional = true } # if wgpu is used, use it without (!) winit +egui-wgpu = { workspace = true, optional = true } # if wgpu is used, use it without (!) winit wgpu = { workspace = true, optional = true } diff --git a/crates/egui-wgpu/Cargo.toml b/crates/egui-wgpu/Cargo.toml index 96384da6978..09e48e07643 100644 --- a/crates/egui-wgpu/Cargo.toml +++ b/crates/egui-wgpu/Cargo.toml @@ -28,6 +28,8 @@ all-features = true [features] +default = [] + ## Enable profiling with the [`puffin`](https://docs.rs/puffin) crate. puffin = ["dep:puffin"] @@ -42,10 +44,8 @@ x11 = ["winit?/x11"] [dependencies] -egui = { version = "0.25.0", path = "../egui", default-features = false } -epaint = { version = "0.25.0", path = "../epaint", default-features = false, features = [ - "bytemuck", -] } +egui = { workspace = true, default-features = false } +epaint = { workspace = true, default-features = false, features = ["bytemuck"] } bytemuck = "1.7" document-features.workspace = true diff --git a/crates/egui-winit/Cargo.toml b/crates/egui-winit/Cargo.toml index 7c57408935e..1e6dda32184 100644 --- a/crates/egui-winit/Cargo.toml +++ b/crates/egui-winit/Cargo.toml @@ -55,9 +55,7 @@ wayland = ["winit/wayland", "bytemuck"] x11 = ["winit/x11", "bytemuck"] [dependencies] -egui = { version = "0.25.0", path = "../egui", default-features = false, features = [ - "log", -] } +egui = { workspace = true, default-features = false, features = ["log"] } log.workspace = true raw-window-handle.workspace = true web-time.workspace = true diff --git a/crates/egui/Cargo.toml b/crates/egui/Cargo.toml index fff2f90d4e4..347dbeda7cb 100644 --- a/crates/egui/Cargo.toml +++ b/crates/egui/Cargo.toml @@ -81,7 +81,7 @@ unity = ["epaint/unity"] [dependencies] -epaint = { version = "0.25.0", path = "../epaint", default-features = false } +epaint = { workspace = true, default-features = false } ahash.workspace = true nohash-hasher.workspace = true diff --git a/crates/egui_demo_app/Cargo.toml b/crates/egui_demo_app/Cargo.toml index 59256272e65..738a8c70266 100644 --- a/crates/egui_demo_app/Cargo.toml +++ b/crates/egui_demo_app/Cargo.toml @@ -38,20 +38,17 @@ chrono = { version = "0.4", default-features = false, features = [ "js-sys", "wasmbind", ] } -eframe = { version = "0.25.0", path = "../eframe", default-features = false, features = [ +eframe = { workspace = true, default-features = false, features = [ "web_screen_reader", ] } -egui = { version = "0.25.0", path = "../egui", features = [ +egui = { workspace = true, features = [ "callstack", + "default", "extra_debug_asserts", "log", ] } -egui_demo_lib = { version = "0.25.0", path = "../egui_demo_lib", features = [ - "chrono", -] } -egui_extras = { version = "0.25.0", path = "../egui_extras", features = [ - "image", -] } +egui_demo_lib = { workspace = true, features = ["default", "chrono"] } +egui_extras = { workspace = true, features = ["default", "image"] } log.workspace = true # Optional dependencies: diff --git a/crates/egui_demo_lib/Cargo.toml b/crates/egui_demo_lib/Cargo.toml index 06730e457aa..a08a88fe8d0 100644 --- a/crates/egui_demo_lib/Cargo.toml +++ b/crates/egui_demo_lib/Cargo.toml @@ -38,11 +38,12 @@ syntect = ["egui_extras/syntect"] [dependencies] -egui = { version = "0.25.0", path = "../egui", default-features = false } -egui_extras = { version = "0.25.0", path = "../egui_extras" } -egui_plot = { version = "0.25.0", path = "../egui_plot" } +egui = { workspace = true, default-features = false } +egui_extras = { workspace = true, features = ["default"] } +egui_plot = { workspace = true, features = ["default"] } + log.workspace = true -unicode_names2 = { version = "0.6.0", default-features = false } # this old version has fewer dependencies +unicode_names2 = { version = "0.6.0", default-features = false } # this old version has fewer dependencies #! ### Optional dependencies chrono = { version = "0.4", optional = true, features = ["js-sys", "wasmbind"] } diff --git a/crates/egui_extras/Cargo.toml b/crates/egui_extras/Cargo.toml index 968ca88effa..2188478afb4 100644 --- a/crates/egui_extras/Cargo.toml +++ b/crates/egui_extras/Cargo.toml @@ -60,9 +60,8 @@ syntect = ["dep:syntect"] [dependencies] -egui = { version = "0.25.0", path = "../egui", default-features = false, features = [ - "serde", -] } +egui = { workspace = true, default-features = false, features = ["serde"] } + enum-map = { version = "2", features = ["serde"] } log.workspace = true serde = { version = "1", features = ["derive"] } diff --git a/crates/egui_glow/Cargo.toml b/crates/egui_glow/Cargo.toml index 9f9d8d30582..56bc1592ab1 100644 --- a/crates/egui_glow/Cargo.toml +++ b/crates/egui_glow/Cargo.toml @@ -50,9 +50,7 @@ x11 = ["winit?/x11"] [dependencies] -egui = { version = "0.25.0", path = "../egui", default-features = false, features = [ - "bytemuck", -] } +egui = { workspace = true, default-features = false, features = ["bytemuck"] } bytemuck = "1.7" glow.workspace = true @@ -69,7 +67,7 @@ document-features = { workspace = true, optional = true } # Native: [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -egui-winit = { version = "0.25.0", path = "../egui-winit", optional = true, default-features = false } +egui-winit = { workspace = true, optional = true, default-features = false } puffin = { workspace = true, optional = true } winit = { workspace = true, optional = true, default-features = false, features = [ "rwh_05", # glutin stuck on old version of raw-window-handle diff --git a/crates/egui_plot/Cargo.toml b/crates/egui_plot/Cargo.toml index 4716c8e961b..61faf7432c0 100644 --- a/crates/egui_plot/Cargo.toml +++ b/crates/egui_plot/Cargo.toml @@ -32,7 +32,7 @@ serde = ["dep:serde", "egui/serde"] [dependencies] -egui = { version = "0.25.0", path = "../egui", default-features = false } +egui = { workspace = true, default-features = false } #! ### Optional dependencies diff --git a/crates/epaint/Cargo.toml b/crates/epaint/Cargo.toml index a8feb337ff9..a24a299b8ed 100644 --- a/crates/epaint/Cargo.toml +++ b/crates/epaint/Cargo.toml @@ -80,8 +80,8 @@ serde = ["dep:serde", "ahash/serde", "emath/serde", "ecolor/serde"] unity = [] [dependencies] -emath = { version = "0.25.0", path = "../emath" } -ecolor = { version = "0.25.0", path = "../ecolor" } +emath.workspace = true +ecolor.workspace = true ab_glyph = "0.2.11" ahash.workspace = true diff --git a/examples/confirm_exit/Cargo.toml b/examples/confirm_exit/Cargo.toml index 2b0fae85dbd..09ad2c4f606 100644 --- a/examples/confirm_exit/Cargo.toml +++ b/examples/confirm_exit/Cargo.toml @@ -9,7 +9,8 @@ publish = false [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } env_logger = { version = "0.10", default-features = false, features = [ diff --git a/examples/custom_3d_glow/Cargo.toml b/examples/custom_3d_glow/Cargo.toml index 0d268759c27..d7e70401a47 100644 --- a/examples/custom_3d_glow/Cargo.toml +++ b/examples/custom_3d_glow/Cargo.toml @@ -9,7 +9,8 @@ publish = false [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } env_logger = { version = "0.10", default-features = false, features = [ diff --git a/examples/custom_font/Cargo.toml b/examples/custom_font/Cargo.toml index 0eec65cd4d5..db633431531 100644 --- a/examples/custom_font/Cargo.toml +++ b/examples/custom_font/Cargo.toml @@ -9,7 +9,8 @@ publish = false [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } env_logger = { version = "0.10", default-features = false, features = [ diff --git a/examples/custom_font_style/Cargo.toml b/examples/custom_font_style/Cargo.toml index a429303bb07..51990ee919d 100644 --- a/examples/custom_font_style/Cargo.toml +++ b/examples/custom_font_style/Cargo.toml @@ -9,7 +9,8 @@ publish = false [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } env_logger = { version = "0.10", default-features = false, features = [ diff --git a/examples/custom_plot_manipulation/Cargo.toml b/examples/custom_plot_manipulation/Cargo.toml index 15943555f66..3df5de96f3d 100644 --- a/examples/custom_plot_manipulation/Cargo.toml +++ b/examples/custom_plot_manipulation/Cargo.toml @@ -9,10 +9,11 @@ publish = false [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } -egui_plot = { path = "../../crates/egui_plot" } +egui_plot.workspace = true env_logger = { version = "0.10", default-features = false, features = [ "auto-color", "humantime", diff --git a/examples/custom_window_frame/Cargo.toml b/examples/custom_window_frame/Cargo.toml index 6dc91e4e503..e163bda492a 100644 --- a/examples/custom_window_frame/Cargo.toml +++ b/examples/custom_window_frame/Cargo.toml @@ -9,7 +9,8 @@ publish = false [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } env_logger = { version = "0.10", default-features = false, features = [ diff --git a/examples/file_dialog/Cargo.toml b/examples/file_dialog/Cargo.toml index 0ad331dff06..f7b2c7a86fa 100644 --- a/examples/file_dialog/Cargo.toml +++ b/examples/file_dialog/Cargo.toml @@ -9,7 +9,8 @@ publish = false [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } env_logger = { version = "0.10", default-features = false, features = [ diff --git a/examples/hello_world/Cargo.toml b/examples/hello_world/Cargo.toml index fb2ca48c920..e9e113c6722 100644 --- a/examples/hello_world/Cargo.toml +++ b/examples/hello_world/Cargo.toml @@ -9,12 +9,13 @@ publish = false [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } # For image support: -egui_extras = { path = "../../crates/egui_extras", features = ["image"] } +egui_extras = { workspace = true, features = ["default", "image"] } env_logger = { version = "0.10", default-features = false, features = [ "auto-color", diff --git a/examples/hello_world_par/Cargo.toml b/examples/hello_world_par/Cargo.toml index 46d6aa741e9..442f671e330 100644 --- a/examples/hello_world_par/Cargo.toml +++ b/examples/hello_world_par/Cargo.toml @@ -9,7 +9,7 @@ publish = false [dependencies] -eframe = { path = "../../crates/eframe", default-features = false, features = [ +eframe = { workspace = true, default-features = false, features = [ # accesskit struggles with threading "default_fonts", "wgpu", diff --git a/examples/hello_world_simple/Cargo.toml b/examples/hello_world_simple/Cargo.toml index 36efecdda60..5b93eb686c7 100644 --- a/examples/hello_world_simple/Cargo.toml +++ b/examples/hello_world_simple/Cargo.toml @@ -9,7 +9,8 @@ publish = false [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } env_logger = { version = "0.10", default-features = false, features = [ diff --git a/examples/images/Cargo.toml b/examples/images/Cargo.toml index bddc9afbfaa..b6cb142f723 100644 --- a/examples/images/Cargo.toml +++ b/examples/images/Cargo.toml @@ -9,10 +9,11 @@ publish = false [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } -egui_extras = { path = "../../crates/egui_extras", features = ["all_loaders"] } +egui_extras = { workspace = true, features = ["default", "all_loaders"] } env_logger = { version = "0.10", default-features = false, features = [ "auto-color", "humantime", diff --git a/examples/keyboard_events/Cargo.toml b/examples/keyboard_events/Cargo.toml index 4f12579e03d..5428bc6a3ae 100644 --- a/examples/keyboard_events/Cargo.toml +++ b/examples/keyboard_events/Cargo.toml @@ -9,7 +9,8 @@ publish = false [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } env_logger = { version = "0.10", default-features = false, features = [ diff --git a/examples/multiple_viewports/Cargo.toml b/examples/multiple_viewports/Cargo.toml index 1e77e32ea74..37b27cb5f96 100644 --- a/examples/multiple_viewports/Cargo.toml +++ b/examples/multiple_viewports/Cargo.toml @@ -11,7 +11,8 @@ publish = false wgpu = ["eframe/wgpu"] [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } env_logger = { version = "0.10", default-features = false, features = [ diff --git a/examples/puffin_profiler/Cargo.toml b/examples/puffin_profiler/Cargo.toml index 4b7b2e9b4bb..021c05651a6 100644 --- a/examples/puffin_profiler/Cargo.toml +++ b/examples/puffin_profiler/Cargo.toml @@ -13,7 +13,8 @@ wgpu = ["eframe/wgpu"] [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "puffin", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } diff --git a/examples/save_plot/Cargo.toml b/examples/save_plot/Cargo.toml index 49a46f58094..03c25755948 100644 --- a/examples/save_plot/Cargo.toml +++ b/examples/save_plot/Cargo.toml @@ -8,10 +8,11 @@ rust-version = "1.72" publish = false [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } -egui_plot = { path = "../../crates/egui_plot" } +egui_plot.workspace = true image = { version = "0.24", default-features = false, features = ["png"] } rfd = "0.11.0" env_logger = { version = "0.10", default-features = false, features = [ diff --git a/examples/screenshot/Cargo.toml b/examples/screenshot/Cargo.toml index f7a65a8bf3f..5c7bbbeec42 100644 --- a/examples/screenshot/Cargo.toml +++ b/examples/screenshot/Cargo.toml @@ -12,7 +12,8 @@ publish = false [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO "wgpu", ] } diff --git a/examples/serial_windows/Cargo.toml b/examples/serial_windows/Cargo.toml index e3ba3159a92..ee0f7b78d25 100644 --- a/examples/serial_windows/Cargo.toml +++ b/examples/serial_windows/Cargo.toml @@ -9,7 +9,8 @@ publish = false [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } env_logger = { version = "0.10", default-features = false, features = [ diff --git a/examples/test_inline_glow_paint/Cargo.toml b/examples/test_inline_glow_paint/Cargo.toml index 472935ed5bf..f0e2a911480 100644 --- a/examples/test_inline_glow_paint/Cargo.toml +++ b/examples/test_inline_glow_paint/Cargo.toml @@ -10,7 +10,7 @@ publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -eframe = { path = "../../crates/eframe" } +eframe = { workspace = true, features = ["default"] } env_logger = { version = "0.10", default-features = false, features = [ "auto-color", "humantime", diff --git a/examples/test_viewports/Cargo.toml b/examples/test_viewports/Cargo.toml index 9ebebae205f..cd5b2be0e18 100644 --- a/examples/test_viewports/Cargo.toml +++ b/examples/test_viewports/Cargo.toml @@ -11,7 +11,8 @@ publish = false wgpu = ["eframe/wgpu"] [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } env_logger = { version = "0.10", default-features = false, features = [ diff --git a/examples/user_attention/Cargo.toml b/examples/user_attention/Cargo.toml index 91103635d20..02a776477dd 100644 --- a/examples/user_attention/Cargo.toml +++ b/examples/user_attention/Cargo.toml @@ -8,7 +8,8 @@ rust-version = "1.72" publish = false [dependencies] -eframe = { path = "../../crates/eframe", features = [ +eframe = { workspace = true, features = [ + "default", "__screenshot", # __screenshot is so we can dump a screenshot using EFRAME_SCREENSHOT_TO ] } env_logger = { version = "0.10", default-features = false, features = [