Use more workspace dependencies (#3975)

This commit is contained in:
Emil Ernerfeldt 2024-02-05 12:43:58 +01:00 committed by GitHub
parent a5f3881d59
commit bcebfecb84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 46 additions and 51 deletions

View File

@ -48,8 +48,18 @@ opt-level = 2
[workspace.dependencies] [workspace.dependencies]
#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
"std",
] }
backtrace = "0.3"
criterion = { version = "0.5.1", default-features = false } criterion = { version = "0.5.1", default-features = false }
document-features = "0.2"
glow = "0.13" glow = "0.13"
log = { version = "0.4", features = ["std"] }
nohash-hasher = "0.2"
parking_lot = "0.12"
puffin = "0.19" puffin = "0.19"
puffin_http = "0.16" puffin_http = "0.16"
raw-window-handle = "0.6.0" raw-window-handle = "0.6.0"

View File

@ -44,7 +44,7 @@ cint = { version = "0.3.1", optional = true }
color-hex = { version = "0.2.0", optional = true } color-hex = { version = "0.2.0", optional = true }
## Enable this when generating docs. ## Enable this when generating docs.
document-features = { version = "0.2", optional = true } document-features = { workspace = true, optional = true }
## Allow serialization using [`serde`](https://docs.rs/serde). ## Allow serialization using [`serde`](https://docs.rs/serde).
serde = { version = "1", optional = true, features = ["derive"] } serde = { version = "1", optional = true, features = ["derive"] }

View File

@ -88,11 +88,7 @@ puffin = [
] ]
## Enables wayland support and fixes clipboard issue. ## Enables wayland support and fixes clipboard issue.
wayland = [ wayland = ["egui-winit/wayland", "egui-wgpu?/wayland", "egui_glow?/wayland"]
"egui-winit/wayland",
"egui-wgpu?/wayland",
"egui_glow?/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.
## ##
@ -109,7 +105,7 @@ web_screen_reader = [
## By default, only WebGPU is enabled on web. ## By default, only WebGPU is enabled on web.
## If you want to enable WebGL, you need to turn on the `webgl` feature of crate `wgpu`: ## If you want to enable WebGL, you need to turn on the `webgl` feature of crate `wgpu`:
## ##
## ```ignore ## ```toml
## wgpu = { version = "*", features = ["webgpu", "webgl"] } ## wgpu = { version = "*", features = ["webgpu", "webgl"] }
## ``` ## ```
## ##
@ -118,11 +114,7 @@ web_screen_reader = [
wgpu = ["dep:wgpu", "dep:egui-wgpu", "dep:pollster"] wgpu = ["dep:wgpu", "dep:egui-wgpu", "dep:pollster"]
## Enables compiling for x11. ## Enables compiling for x11.
x11 = [ x11 = ["egui-winit/x11", "egui-wgpu?/x11", "egui_glow?/x11"]
"egui-winit/x11",
"egui-wgpu?/x11",
"egui_glow?/x11",
]
## If set, eframe will look for the env-var `EFRAME_SCREENSHOT_TO` and write a screenshot to that location, and then quit. ## If set, eframe will look for the env-var `EFRAME_SCREENSHOT_TO` and write a screenshot to that location, and then quit.
## This is used to generate images for examples. ## This is used to generate images for examples.
@ -133,16 +125,16 @@ egui = { version = "0.25.0", path = "../egui", default-features = false, feature
"bytemuck", "bytemuck",
"log", "log",
] } ] }
log = { version = "0.4", features = ["std"] }
parking_lot = "0.12" document-features.workspace = true
log.workspace = true
parking_lot.workspace = true
raw-window-handle.workspace = true raw-window-handle.workspace = true
static_assertions = "1.1.0" static_assertions = "1.1.0"
thiserror.workspace = true thiserror.workspace = true
web-time.workspace = true web-time.workspace = true
#! ### Optional dependencies # Optional dependencies
## Enable this when generating docs.
document-features = { version = "0.2", optional = true }
egui_glow = { version = "0.25.0", path = "../egui_glow", optional = true, default-features = false } egui_glow = { version = "0.25.0", path = "../egui_glow", optional = true, default-features = false }
glow = { workspace = true, optional = true } glow = { workspace = true, optional = true }

View File

@ -130,7 +130,7 @@
//! ``` //! ```
//! //!
//! ## Feature flags //! ## Feature flags
#![cfg_attr(feature = "document-features", doc = document_features::document_features!())] #![doc = document_features::document_features!()]
//! //!
#![warn(missing_docs)] // let's keep eframe well-documented #![warn(missing_docs)] // let's keep eframe well-documented

View File

@ -48,15 +48,14 @@ epaint = { version = "0.25.0", path = "../epaint", default-features = false, fea
] } ] }
bytemuck = "1.7" bytemuck = "1.7"
log = { version = "0.4", features = ["std"] } document-features.workspace = true
log.workspace = true
thiserror.workspace = true thiserror.workspace = true
type-map = "0.5.0" type-map = "0.5.0"
web-time.workspace = true web-time.workspace = true
wgpu = { workspace = true, features = ["wgsl"] } wgpu = { workspace = true, features = ["wgsl"] }
#! ### Optional dependencies # Optional dependencies:
## Enable this when generating docs.
document-features = { version = "0.2", optional = true }
winit = { workspace = true, optional = true, default-features = false, features = [ winit = { workspace = true, optional = true, default-features = false, features = [
"rwh_06", "rwh_06",

View File

@ -13,7 +13,7 @@
//! The default is to prefer WebGPU and fall back on WebGL. //! The default is to prefer WebGPU and fall back on WebGL.
//! //!
//! ## Feature flags //! ## Feature flags
#![cfg_attr(feature = "document-features", doc = document_features::document_features!())] #![doc = document_features::document_features!()]
//! //!
#![allow(unsafe_code)] #![allow(unsafe_code)]

View File

@ -58,7 +58,7 @@ x11 = ["winit/x11", "bytemuck"]
egui = { version = "0.25.0", path = "../egui", default-features = false, features = [ egui = { version = "0.25.0", path = "../egui", default-features = false, features = [
"log", "log",
] } ] }
log = { version = "0.4", features = ["std"] } log.workspace = true
raw-window-handle.workspace = true raw-window-handle.workspace = true
web-time.workspace = true web-time.workspace = true
winit = { workspace = true, default-features = false, features = ["rwh_06"] } winit = { workspace = true, default-features = false, features = ["rwh_06"] }
@ -69,7 +69,7 @@ winit = { workspace = true, default-features = false, features = ["rwh_06"] }
accesskit_winit = { version = "0.16.0", optional = true } accesskit_winit = { version = "0.16.0", optional = true }
## Enable this when generating docs. ## Enable this when generating docs.
document-features = { version = "0.2", optional = true } document-features = { workspace = true, optional = true }
puffin = { workspace = true, optional = true } puffin = { workspace = true, optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] } serde = { version = "1.0", optional = true, features = ["derive"] }

View File

@ -83,21 +83,18 @@ unity = ["epaint/unity"]
[dependencies] [dependencies]
epaint = { version = "0.25.0", path = "../epaint", default-features = false } epaint = { version = "0.25.0", path = "../epaint", default-features = false }
ahash = { version = "0.8.6", default-features = false, features = [ ahash.workspace = true
"no-rng", # we don't need DOS-protection, so we let users opt-in to it instead nohash-hasher.workspace = true
"std",
] }
nohash-hasher = "0.2"
#! ### Optional dependencies #! ### Optional dependencies
accesskit = { version = "0.12", optional = true } accesskit = { version = "0.12", optional = true }
backtrace = { version = "0.3", optional = true } backtrace = { workspace = true, optional = true }
## Enable this when generating docs. ## Enable this when generating docs.
document-features = { version = "0.2", optional = true } document-features = { workspace = true, optional = true }
log = { version = "0.4", optional = true, features = ["std"] } log = { workspace = true, optional = true }
puffin = { workspace = true, optional = true } puffin = { workspace = true, optional = true }
ron = { version = "0.8", optional = true } ron = { version = "0.8", optional = true }
serde = { version = "1", optional = true, features = ["derive", "rc"] } serde = { version = "1", optional = true, features = ["derive", "rc"] }

View File

@ -52,7 +52,7 @@ egui_demo_lib = { version = "0.25.0", path = "../egui_demo_lib", features = [
egui_extras = { version = "0.25.0", path = "../egui_extras", features = [ egui_extras = { version = "0.25.0", path = "../egui_extras", features = [
"image", "image",
] } ] }
log = { version = "0.4", features = ["std"] } log.workspace = true
# Optional dependencies: # Optional dependencies:

View File

@ -41,13 +41,13 @@ syntect = ["egui_extras/syntect"]
egui = { version = "0.25.0", path = "../egui", default-features = false } egui = { version = "0.25.0", path = "../egui", default-features = false }
egui_extras = { version = "0.25.0", path = "../egui_extras" } egui_extras = { version = "0.25.0", path = "../egui_extras" }
egui_plot = { version = "0.25.0", path = "../egui_plot" } egui_plot = { version = "0.25.0", path = "../egui_plot" }
log = { version = "0.4", features = ["std"] } 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 #! ### Optional dependencies
chrono = { version = "0.4", optional = true, features = ["js-sys", "wasmbind"] } chrono = { version = "0.4", optional = true, features = ["js-sys", "wasmbind"] }
## Enable this when generating docs. ## Enable this when generating docs.
document-features = { version = "0.2", optional = true } document-features = { workspace = true, optional = true }
serde = { version = "1", optional = true, features = ["derive"] } serde = { version = "1", optional = true, features = ["derive"] }

View File

@ -64,7 +64,7 @@ egui = { version = "0.25.0", path = "../egui", default-features = false, feature
"serde", "serde",
] } ] }
enum-map = { version = "2", features = ["serde"] } enum-map = { version = "2", features = ["serde"] }
log = { version = "0.4", features = ["std"] } log.workspace = true
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
#! ### Optional dependencies #! ### Optional dependencies
@ -78,7 +78,7 @@ chrono = { version = "0.4", optional = true, default-features = false, features
] } ] }
## Enable this when generating docs. ## Enable this when generating docs.
document-features = { version = "0.2", optional = true } document-features = { workspace = true, optional = true }
image = { version = "0.24", optional = true, default-features = false } image = { version = "0.24", optional = true, default-features = false }

View File

@ -56,7 +56,7 @@ egui = { version = "0.25.0", path = "../egui", default-features = false, feature
bytemuck = "1.7" bytemuck = "1.7"
glow.workspace = true glow.workspace = true
log = { version = "0.4", features = ["std"] } log.workspace = true
memoffset = "0.7" memoffset = "0.7"
# glutin stuck on old version of raw-window-handle: # glutin stuck on old version of raw-window-handle:
rwh_05 = { package = "raw-window-handle", version = "0.5.2", features = [ rwh_05 = { package = "raw-window-handle", version = "0.5.2", features = [
@ -65,7 +65,7 @@ rwh_05 = { package = "raw-window-handle", version = "0.5.2", features = [
#! ### Optional dependencies #! ### Optional dependencies
## Enable this when generating docs. ## Enable this when generating docs.
document-features = { version = "0.2", optional = true } document-features = { workspace = true, optional = true }
# Native: # Native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]

View File

@ -37,6 +37,6 @@ egui = { version = "0.25.0", path = "../egui", default-features = false }
#! ### Optional dependencies #! ### Optional dependencies
## Enable this when generating docs. ## Enable this when generating docs.
document-features = { version = "0.2", optional = true } document-features = { workspace = true, optional = true }
serde = { version = "1", optional = true, features = ["derive"] } serde = { version = "1", optional = true, features = ["derive"] }

View File

@ -36,7 +36,7 @@ extra_asserts = []
bytemuck = { version = "1.7.2", optional = true, features = ["derive"] } bytemuck = { version = "1.7.2", optional = true, features = ["derive"] }
## Enable this when generating docs. ## Enable this when generating docs.
document-features = { version = "0.2", optional = true } document-features = { workspace = true, optional = true }
## [`mint`](https://docs.rs/mint) enables interoperability with other math libraries such as [`glam`](https://docs.rs/glam) and [`nalgebra`](https://docs.rs/nalgebra). ## [`mint`](https://docs.rs/mint) enables interoperability with other math libraries such as [`glam`](https://docs.rs/glam) and [`nalgebra`](https://docs.rs/nalgebra).
mint = { version = "0.5.6", optional = true } mint = { version = "0.5.6", optional = true }

View File

@ -84,20 +84,17 @@ emath = { version = "0.25.0", path = "../emath" }
ecolor = { version = "0.25.0", path = "../ecolor" } ecolor = { version = "0.25.0", path = "../ecolor" }
ab_glyph = "0.2.11" ab_glyph = "0.2.11"
ahash = { version = "0.8.1", default-features = false, features = [ ahash.workspace = true
"no-rng", # we don't need DOS-protection, so we let users opt-in to it instead nohash-hasher.workspace = true
"std", parking_lot.workspace = true # Using parking_lot over std::sync::Mutex gives 50% speedups in some real-world scenarios.
] }
nohash-hasher = "0.2"
parking_lot = "0.12" # Using parking_lot over std::sync::Mutex gives 50% speedups in some real-world scenarios.
#! ### Optional dependencies #! ### Optional dependencies
bytemuck = { version = "1.7.2", optional = true, features = ["derive"] } bytemuck = { version = "1.7.2", optional = true, features = ["derive"] }
## Enable this when generating docs. ## Enable this when generating docs.
document-features = { version = "0.2", optional = true } document-features = { workspace = true, optional = true }
log = { version = "0.4", optional = true, features = ["std"] } log = { workspace = true, optional = true }
puffin = { workspace = true, optional = true } puffin = { workspace = true, optional = true }
rayon = { version = "1.7", optional = true } rayon = { version = "1.7", optional = true }
@ -106,7 +103,7 @@ serde = { version = "1", optional = true, features = ["derive", "rc"] }
# native: # native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
backtrace = { version = "0.3", optional = true } backtrace = { workspace = true, optional = true }
[dev-dependencies] [dev-dependencies]