diff --git a/crates/eframe/Cargo.toml b/crates/eframe/Cargo.toml index 32af7b34fa0..feea8124c97 100644 --- a/crates/eframe/Cargo.toml +++ b/crates/eframe/Cargo.toml @@ -105,7 +105,7 @@ web_screen_reader = [ ## 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`: ## -## ```ignore +## ```toml ## wgpu = { version = "*", features = ["webgpu", "webgl"] } ## ``` ## @@ -125,6 +125,8 @@ egui = { version = "0.25.0", path = "../egui", default-features = false, feature "bytemuck", "log", ] } + +document-features.workspace = true log = { version = "0.4", features = ["std"] } parking_lot = "0.12" raw-window-handle.workspace = true @@ -132,9 +134,7 @@ static_assertions = "1.1.0" thiserror.workspace = true web-time.workspace = true -#! ### Optional dependencies -## Enable this when generating docs. -document-features = { workspace = true, optional = true } +# Optional dependencies egui_glow = { version = "0.25.0", path = "../egui_glow", optional = true, default-features = false } glow = { workspace = true, optional = true } diff --git a/crates/eframe/src/lib.rs b/crates/eframe/src/lib.rs index d34d665b299..98576358a70 100644 --- a/crates/eframe/src/lib.rs +++ b/crates/eframe/src/lib.rs @@ -130,7 +130,7 @@ //! ``` //! //! ## 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 diff --git a/crates/egui-wgpu/Cargo.toml b/crates/egui-wgpu/Cargo.toml index 8b8a768825b..76cd61bd78f 100644 --- a/crates/egui-wgpu/Cargo.toml +++ b/crates/egui-wgpu/Cargo.toml @@ -48,15 +48,14 @@ epaint = { version = "0.25.0", path = "../epaint", default-features = false, fea ] } bytemuck = "1.7" +document-features.workspace = true log = { version = "0.4", features = ["std"] } thiserror.workspace = true type-map = "0.5.0" web-time.workspace = true wgpu = { workspace = true, features = ["wgsl"] } -#! ### Optional dependencies -## Enable this when generating docs. -document-features = { workspace = true, optional = true } +# Optional dependencies: winit = { workspace = true, optional = true, default-features = false, features = [ "rwh_06", diff --git a/crates/egui-wgpu/src/lib.rs b/crates/egui-wgpu/src/lib.rs index 66caf2616c0..bb696aa28df 100644 --- a/crates/egui-wgpu/src/lib.rs +++ b/crates/egui-wgpu/src/lib.rs @@ -13,7 +13,7 @@ //! The default is to prefer WebGPU and fall back on WebGL. //! //! ## Feature flags -#![cfg_attr(feature = "document-features", doc = document_features::document_features!())] +#![doc = document_features::document_features!()] //! #![allow(unsafe_code)]