Skip to content

Commit

Permalink
Enable document-features by default in eframe and egui-wgpu
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Feb 5, 2024
1 parent 20131cb commit 9d2d9b5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions crates/eframe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
## ```
##
Expand All @@ -125,16 +125,16 @@ 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
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 }
Expand Down
2 changes: 1 addition & 1 deletion crates/eframe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions crates/egui-wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion crates/egui-wgpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 9d2d9b5

Please sign in to comment.