Document feature flags using crate document-features (#1725)
This commit is contained in:
parent
218d4d4eea
commit
3169ce62d5
21 changed files with 193 additions and 83 deletions
16
Cargo.lock
generated
16
Cargo.lock
generated
|
@ -1071,6 +1071,12 @@ dependencies = [
|
||||||
"rand",
|
"rand",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "document-features"
|
||||||
|
version = "0.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b01c09fd63b5136fba41aa625c7b3254f0aa0a435ff6ec4b2c9a28d496c83c88"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "downcast-rs"
|
name = "downcast-rs"
|
||||||
version = "1.2.0"
|
version = "1.2.0"
|
||||||
|
@ -1128,6 +1134,7 @@ dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"dark-light",
|
"dark-light",
|
||||||
"directories-next",
|
"directories-next",
|
||||||
|
"document-features",
|
||||||
"egui",
|
"egui",
|
||||||
"egui-wgpu",
|
"egui-wgpu",
|
||||||
"egui-winit",
|
"egui-winit",
|
||||||
|
@ -1153,6 +1160,7 @@ name = "egui"
|
||||||
version = "0.18.1"
|
version = "0.18.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.7.6",
|
"ahash 0.7.6",
|
||||||
|
"document-features",
|
||||||
"epaint",
|
"epaint",
|
||||||
"nohash-hasher",
|
"nohash-hasher",
|
||||||
"ron",
|
"ron",
|
||||||
|
@ -1165,6 +1173,7 @@ name = "egui-wgpu"
|
||||||
version = "0.18.0"
|
version = "0.18.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
|
"document-features",
|
||||||
"egui",
|
"egui",
|
||||||
"pollster",
|
"pollster",
|
||||||
"tracing",
|
"tracing",
|
||||||
|
@ -1178,6 +1187,7 @@ name = "egui-winit"
|
||||||
version = "0.18.0"
|
version = "0.18.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arboard",
|
"arboard",
|
||||||
|
"document-features",
|
||||||
"egui",
|
"egui",
|
||||||
"instant",
|
"instant",
|
||||||
"puffin",
|
"puffin",
|
||||||
|
@ -1215,6 +1225,7 @@ version = "0.18.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"criterion",
|
"criterion",
|
||||||
|
"document-features",
|
||||||
"egui",
|
"egui",
|
||||||
"egui_extras",
|
"egui_extras",
|
||||||
"enum-map",
|
"enum-map",
|
||||||
|
@ -1229,6 +1240,7 @@ name = "egui_extras"
|
||||||
version = "0.18.0"
|
version = "0.18.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
|
"document-features",
|
||||||
"egui",
|
"egui",
|
||||||
"image",
|
"image",
|
||||||
"resvg",
|
"resvg",
|
||||||
|
@ -1244,6 +1256,7 @@ version = "0.18.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.7.6",
|
"ahash 0.7.6",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
|
"document-features",
|
||||||
"egui",
|
"egui",
|
||||||
"egui-winit",
|
"egui-winit",
|
||||||
"glium",
|
"glium",
|
||||||
|
@ -1255,6 +1268,7 @@ name = "egui_glow"
|
||||||
version = "0.18.1"
|
version = "0.18.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
|
"document-features",
|
||||||
"egui",
|
"egui",
|
||||||
"egui-winit",
|
"egui-winit",
|
||||||
"glow",
|
"glow",
|
||||||
|
@ -1290,6 +1304,7 @@ name = "emath"
|
||||||
version = "0.18.0"
|
version = "0.18.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
|
"document-features",
|
||||||
"mint",
|
"mint",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
@ -1361,6 +1376,7 @@ dependencies = [
|
||||||
"cint",
|
"cint",
|
||||||
"color-hex",
|
"color-hex",
|
||||||
"criterion",
|
"criterion",
|
||||||
|
"document-features",
|
||||||
"emath",
|
"emath",
|
||||||
"nohash-hasher",
|
"nohash-hasher",
|
||||||
"parking_lot 0.12.0",
|
"parking_lot 0.12.0",
|
||||||
|
|
|
@ -22,16 +22,17 @@ all-features = true
|
||||||
[features]
|
[features]
|
||||||
default = ["default_fonts", "glow"]
|
default = ["default_fonts", "glow"]
|
||||||
|
|
||||||
# detect dark mode system preference
|
## Detect dark mode system preference using [`dark-light`](https://docs.rs/dark-light).
|
||||||
dark-light = ["dep:dark-light"]
|
dark-light = ["dep:dark-light"]
|
||||||
|
|
||||||
# If set, egui will use `include_bytes!` to bundle some fonts.
|
## If set, egui will use `include_bytes!` to bundle some fonts.
|
||||||
# If you plan on specifying your own fonts you may disable this feature.
|
## If you plan on specifying your own fonts you may disable this feature.
|
||||||
default_fonts = ["egui/default_fonts"]
|
default_fonts = ["egui/default_fonts"]
|
||||||
|
|
||||||
|
## Use [`glow`](https://github.com/grovesNL/glow) for painting, via [`egui_glow`](https://github.com/emilk/egui/tree/master/egui_glow).
|
||||||
glow = ["dep:glow", "egui_glow"]
|
glow = ["dep:glow", "egui_glow"]
|
||||||
|
|
||||||
# Enable saving app state to disk.
|
## Enable saving app state to disk.
|
||||||
persistence = [
|
persistence = [
|
||||||
"directories-next",
|
"directories-next",
|
||||||
"egui-winit/serde",
|
"egui-winit/serde",
|
||||||
|
@ -40,29 +41,34 @@ persistence = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Enable profiling with the puffin crate: https://github.com/EmbarkStudios/puffin
|
## Enable profiling with the [`puffin`](https://docs.rs/puffin) crate.
|
||||||
# Only enabled on native, because of the low resolution (1ms) of time keeping in browsers.
|
##
|
||||||
# eframe will call `puffin::GlobalProfiler::lock().new_frame()` for you
|
## Only enabled on native, because of the low resolution (1ms) of time keeping in browsers.
|
||||||
|
## `eframe` will call `puffin::GlobalProfiler::lock().new_frame()` for you
|
||||||
puffin = ["dep:puffin", "egui_glow/puffin"]
|
puffin = ["dep:puffin", "egui_glow/puffin"]
|
||||||
|
|
||||||
# enable screen reader support (requires `ctx.options().screen_reader = true;`)
|
## Enable screen reader support (requires `ctx.options().screen_reader = true;`)
|
||||||
screen_reader = [
|
screen_reader = [
|
||||||
"egui-winit/screen_reader",
|
"egui-winit/screen_reader",
|
||||||
"tts",
|
"tts",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Use WGPU as the backend instead of glow
|
## Use [`wgpu`](https://docs.rs/wgpu) for painting (via [`egui_wgpu`](https://github.com/emilk/egui/tree/master/egui_wgpu)).
|
||||||
|
## This overrides the `glow` feature.
|
||||||
wgpu = ["dep:wgpu", "egui-wgpu"]
|
wgpu = ["dep:wgpu", "egui-wgpu"]
|
||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
# Needed when generating the docs, but unfortunately also needed by `cargo check`
|
||||||
|
document-features = "0.2"
|
||||||
|
|
||||||
egui = { version = "0.18.0", path = "../egui", default-features = false, features = [
|
egui = { version = "0.18.0", path = "../egui", default-features = false, features = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"tracing",
|
"tracing",
|
||||||
] }
|
] }
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
|
|
||||||
# optional:
|
#! ### Optional dependencies
|
||||||
egui_glow = { version = "0.18.0", path = "../egui_glow", optional = true, default-features = false }
|
egui_glow = { version = "0.18.0", path = "../egui_glow", optional = true, default-features = false }
|
||||||
egui-wgpu = { version = "0.18.0", path = "../egui-wgpu", optional = true, features = ["winit"] }
|
egui-wgpu = { version = "0.18.0", path = "../egui-wgpu", optional = true, features = ["winit"] }
|
||||||
glow = { version = "0.11", optional = true }
|
glow = { version = "0.11", optional = true }
|
||||||
|
@ -133,6 +139,6 @@ web-sys = { version = "0.3.52", features = [
|
||||||
"Window",
|
"Window",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
# optional:
|
# optional
|
||||||
# feature screen_reader
|
# feature screen_reader
|
||||||
tts = { version = "0.20", optional = true } # stuck on old version due to compilation problems on linux
|
tts = { version = "0.20", optional = true } # stuck on old version due to compilation problems on linux
|
||||||
|
|
|
@ -52,6 +52,10 @@
|
||||||
//! eframe::start_web(canvas_id, Box::new(|cc| Box::new(MyApp::new(cc))))
|
//! eframe::start_web(canvas_id, Box::new(|cc| Box::new(MyApp::new(cc))))
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
|
//!
|
||||||
|
//! ## Feature flags
|
||||||
|
#![doc = document_features::document_features!()]
|
||||||
|
//!
|
||||||
|
|
||||||
#![allow(clippy::needless_doctest_main)]
|
#![allow(clippy::needless_doctest_main)]
|
||||||
|
|
||||||
|
|
|
@ -28,11 +28,14 @@ all-features = true
|
||||||
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# Make it easy to create bindings for winit.
|
## Enable [`winit`](https://docs.rs/winit) integration.
|
||||||
winit = ["dep:pollster", "dep:winit"]
|
winit = ["dep:pollster", "dep:winit"]
|
||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
# Needed when generating the docs, but unfortunately also needed by `cargo check`
|
||||||
|
document-features = "0.2"
|
||||||
|
|
||||||
egui = { version = "0.18.1", path = "../egui", default-features = false, features = [
|
egui = { version = "0.18.1", path = "../egui", default-features = false, features = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
] }
|
] }
|
||||||
|
@ -42,6 +45,6 @@ tracing = "0.1"
|
||||||
type-map = "0.5.0"
|
type-map = "0.5.0"
|
||||||
wgpu = { version = "0.12", features = ["webgl"] }
|
wgpu = { version = "0.12", features = ["webgl"] }
|
||||||
|
|
||||||
# Optional:
|
#! ### Optional dependencies
|
||||||
pollster = { version = "0.2", optional = true }
|
pollster = { version = "0.2", optional = true }
|
||||||
winit = { version = "0.26", optional = true }
|
winit = { version = "0.26", optional = true }
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
//! This crates provides bindings between [`egui`](https://github.com/emilk/egui) and [wgpu](https://crates.io/crates/wgpu).
|
//! This crates provides bindings between [`egui`](https://github.com/emilk/egui) and [wgpu](https://crates.io/crates/wgpu).
|
||||||
|
//!
|
||||||
|
//! ## Feature flags
|
||||||
|
#![doc = document_features::document_features!()]
|
||||||
|
//!
|
||||||
|
|
||||||
#![allow(unsafe_code)]
|
#![allow(unsafe_code)]
|
||||||
|
|
||||||
|
|
|
@ -20,27 +20,30 @@ all-features = true
|
||||||
[features]
|
[features]
|
||||||
default = ["clipboard", "links"]
|
default = ["clipboard", "links"]
|
||||||
|
|
||||||
# implement bytemuck on most types.
|
## [`bytemuck`](https://docs.rs/bytemuck) enables you to cast [`egui::epaint::Vertex`], [`egui::Vec2`] etc to `&[u8]`.
|
||||||
bytemuck = ["egui/bytemuck"]
|
bytemuck = ["egui/bytemuck"]
|
||||||
|
|
||||||
# enable cut/copy/paste to OS clipboard.
|
## Enable cut/copy/paste to OS clipboard.
|
||||||
# if disabled a clipboard will be simulated so you can still copy/paste within the egui app.
|
## If disabled a clipboard will be simulated so you can still copy/paste within the egui app.
|
||||||
clipboard = ["arboard", "smithay-clipboard"]
|
clipboard = ["arboard", "smithay-clipboard"]
|
||||||
|
|
||||||
# enable opening links in a browser when an egui hyperlink is clicked.
|
## Enable opening links in a browser when an egui hyperlink is clicked.
|
||||||
links = ["webbrowser"]
|
links = ["webbrowser"]
|
||||||
|
|
||||||
# enable profiling with the puffin crate: https://github.com/EmbarkStudios/puffin
|
## Enable profiling with the [`puffin`](https://docs.rs/puffin) crate.
|
||||||
puffin = ["dep:puffin"]
|
puffin = ["dep:puffin"]
|
||||||
|
|
||||||
# experimental support for a screen reader
|
## Experimental support for a screen reader.
|
||||||
screen_reader = ["tts"]
|
screen_reader = ["tts"]
|
||||||
|
|
||||||
# to serialize `WindowSettings`
|
## Allow serialization of [`WindowSettings`] using [`serde`](https://docs.rs/serde).
|
||||||
serde = ["egui/serde", "dep:serde"]
|
serde = ["egui/serde", "dep:serde"]
|
||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
# Needed when generating the docs, but unfortunately also needed by `cargo check`
|
||||||
|
document-features = "0.2"
|
||||||
|
|
||||||
egui = { version = "0.18.0", path = "../egui", default-features = false, features = [
|
egui = { version = "0.18.0", path = "../egui", default-features = false, features = [
|
||||||
"tracing",
|
"tracing",
|
||||||
] }
|
] }
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
//!
|
//!
|
||||||
//! The library translates winit events to egui, handled copy/paste,
|
//! The library translates winit events to egui, handled copy/paste,
|
||||||
//! updates the cursor, open links clicked in egui, etc.
|
//! updates the cursor, open links clicked in egui, etc.
|
||||||
|
//!
|
||||||
|
//! ## Feature flags
|
||||||
|
#![doc = document_features::document_features!()]
|
||||||
|
//!
|
||||||
|
|
||||||
#![allow(clippy::manual_range_contains)]
|
#![allow(clippy::manual_range_contains)]
|
||||||
|
|
||||||
|
|
|
@ -22,45 +22,48 @@ all-features = true
|
||||||
[features]
|
[features]
|
||||||
default = ["default_fonts"]
|
default = ["default_fonts"]
|
||||||
|
|
||||||
# add compatibility with https://crates.io/crates/cint
|
## [`bytemuck`](https://docs.rs/bytemuck) enables you to cast [`epaint::Vertex`], [`emath::Vec2`] etc to `&[u8]`.
|
||||||
cint = ["epaint/cint"]
|
|
||||||
|
|
||||||
# implement bytemuck on most types.
|
|
||||||
bytemuck = ["epaint/bytemuck"]
|
bytemuck = ["epaint/bytemuck"]
|
||||||
|
|
||||||
# This will automatically detect deadlocks due to double-locking on the same thread.
|
## [`cint`](https://docs.rs/cint) enables interopability with other color libraries.
|
||||||
# If your app freezes, you may want to enable this!
|
cint = ["epaint/cint"]
|
||||||
# Only affects `epaint::mutex::RwLock` (which egui uses a lot).
|
|
||||||
deadlock_detection = ["epaint/deadlock_detection"]
|
|
||||||
|
|
||||||
# If set, egui will use `include_bytes!` to bundle some fonts.
|
## Enable the [`hex_color`] macro.
|
||||||
# If you plan on specifying your own fonts you may disable this feature.
|
|
||||||
default_fonts = ["epaint/default_fonts"]
|
|
||||||
|
|
||||||
# Enable additional checks if debug assertions are enabled (debug builds).
|
|
||||||
extra_debug_asserts = ["epaint/extra_debug_asserts"]
|
|
||||||
# Always enable additional checks.
|
|
||||||
extra_asserts = ["epaint/extra_asserts"]
|
|
||||||
|
|
||||||
# Add compatability with https://github.com/kvark/mint
|
|
||||||
mint = ["epaint/mint"]
|
|
||||||
|
|
||||||
# enable persistence of memory (window positions etc).
|
|
||||||
persistence = ["serde", "epaint/serde", "ron"]
|
|
||||||
|
|
||||||
# implement serde on most types.
|
|
||||||
serde = ["dep:serde", "epaint/serde"]
|
|
||||||
|
|
||||||
# Ease of use hex to Color32 macro
|
|
||||||
color-hex = ["epaint/color-hex"]
|
color-hex = ["epaint/color-hex"]
|
||||||
|
|
||||||
|
## This will automatically detect deadlocks due to double-locking on the same thread.
|
||||||
|
## If your app freezes, you may want to enable this!
|
||||||
|
## Only affects [`epaint::mutex::RwLock`] (which egui uses a lot).
|
||||||
|
deadlock_detection = ["epaint/deadlock_detection"]
|
||||||
|
|
||||||
|
## If set, egui will use `include_bytes!` to bundle some fonts.
|
||||||
|
## If you plan on specifying your own fonts you may disable this feature.
|
||||||
|
default_fonts = ["epaint/default_fonts"]
|
||||||
|
|
||||||
|
## Enable additional checks if debug assertions are enabled (debug builds).
|
||||||
|
extra_debug_asserts = ["epaint/extra_debug_asserts"]
|
||||||
|
## Always enable additional checks.
|
||||||
|
extra_asserts = ["epaint/extra_asserts"]
|
||||||
|
|
||||||
|
## [`mint`](https://docs.rs/mint) enables interopability with other math libraries such as [`glam`](https://docs.rs/glam) and [`nalgebra`](https://docs.rs/nalgebra).
|
||||||
|
mint = ["epaint/mint"]
|
||||||
|
|
||||||
|
## Enable persistence of memory (window positions etc).
|
||||||
|
persistence = ["serde", "epaint/serde", "ron"]
|
||||||
|
|
||||||
|
## Allow serialization using [`serde`](https://docs.rs/serde).
|
||||||
|
serde = ["dep:serde", "epaint/serde"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
# Needed when generating the docs, but unfortunately also needed by `cargo check`
|
||||||
|
document-features = "0.2"
|
||||||
|
|
||||||
epaint = { version = "0.18.1", path = "../epaint", default-features = false }
|
epaint = { version = "0.18.1", path = "../epaint", default-features = false }
|
||||||
|
|
||||||
ahash = "0.7"
|
ahash = "0.7"
|
||||||
nohash-hasher = "0.2"
|
nohash-hasher = "0.2"
|
||||||
|
|
||||||
# Optional:
|
#! ### Optional dependencies
|
||||||
ron = { version = "0.7", optional = true }
|
ron = { version = "0.7", optional = true }
|
||||||
serde = { version = "1", optional = true, features = ["derive", "rc"] }
|
serde = { version = "1", optional = true, features = ["derive", "rc"] }
|
||||||
# egui doesn't log much, but when it does, it uses `tracing`
|
# egui doesn't log much, but when it does, it uses `tracing`
|
||||||
|
|
|
@ -291,6 +291,10 @@
|
||||||
//! }); // the temporary settings are reverted here
|
//! }); // the temporary settings are reverted here
|
||||||
//! # });
|
//! # });
|
||||||
//! ```
|
//! ```
|
||||||
|
//!
|
||||||
|
//! ## Feature flags
|
||||||
|
#![doc = document_features::document_features!()]
|
||||||
|
//!
|
||||||
|
|
||||||
#![allow(clippy::float_cmp)]
|
#![allow(clippy::float_cmp)]
|
||||||
#![allow(clippy::manual_range_contains)]
|
#![allow(clippy::manual_range_contains)]
|
||||||
|
|
|
@ -23,11 +23,16 @@ all-features = true
|
||||||
default = []
|
default = []
|
||||||
|
|
||||||
chrono = ["egui_extras/datepicker", "dep:chrono"]
|
chrono = ["egui_extras/datepicker", "dep:chrono"]
|
||||||
|
## Allow serialization using [`serde`](https://docs.rs/serde).
|
||||||
serde = ["egui/serde", "dep:serde"]
|
serde = ["egui/serde", "dep:serde"]
|
||||||
|
## Enable better syntax highlighting using [`syntect`](https://docs.rs/syntect).
|
||||||
syntax_highlighting = ["syntect"]
|
syntax_highlighting = ["syntect"]
|
||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
# Needed when generating the docs, but unfortunately also needed by `cargo check`
|
||||||
|
document-features = "0.2"
|
||||||
|
|
||||||
egui = { version = "0.18.0", path = "../egui", default-features = false }
|
egui = { version = "0.18.0", path = "../egui", default-features = false }
|
||||||
egui_extras = { version = "0.18.0", path = "../egui_extras" }
|
egui_extras = { version = "0.18.0", path = "../egui_extras" }
|
||||||
enum-map = { version = "2", features = ["serde"] }
|
enum-map = { version = "2", features = ["serde"] }
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
//! This library can be used to test 3rd party egui integrations (see for instance <https://github.com/not-fl3/egui-miniquad/blob/master/examples/demo.rs>).
|
//! This library can be used to test 3rd party egui integrations (see for instance <https://github.com/not-fl3/egui-miniquad/blob/master/examples/demo.rs>).
|
||||||
//!
|
//!
|
||||||
//! The demo is also used in benchmarks and tests.
|
//! The demo is also used in benchmarks and tests.
|
||||||
|
//!
|
||||||
|
//! ## Feature flags
|
||||||
|
#![doc = document_features::document_features!()]
|
||||||
|
//!
|
||||||
|
|
||||||
#![allow(clippy::float_cmp)]
|
#![allow(clippy::float_cmp)]
|
||||||
#![allow(clippy::manual_range_contains)]
|
#![allow(clippy::manual_range_contains)]
|
||||||
|
|
|
@ -26,29 +26,33 @@ all-features = true
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|
||||||
# Datepicker widget
|
## Enable [`DatePickerButton`] widget.
|
||||||
datepicker = ["chrono"]
|
datepicker = ["chrono"]
|
||||||
|
|
||||||
|
## Allow serialization using [`serde`](https://docs.rs/serde).
|
||||||
serde = ["dep:serde"]
|
serde = ["dep:serde"]
|
||||||
|
|
||||||
# Support loading svg images
|
## Support loading svg images.
|
||||||
svg = ["resvg", "tiny-skia", "usvg"]
|
svg = ["resvg", "tiny-skia", "usvg"]
|
||||||
|
|
||||||
# Log warnings using `tracing` crate
|
## Log warnings using `tracing` crate.
|
||||||
tracing = ["dep:tracing", "egui/tracing"]
|
tracing = ["dep:tracing", "egui/tracing"]
|
||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
egui = { version = "0.18.0", path = "../egui", default-features = false }
|
egui = { version = "0.18.0", path = "../egui", default-features = false }
|
||||||
|
|
||||||
# Optional dependencies:
|
#! ### Optional dependencies
|
||||||
|
|
||||||
# Date operations needed for datepicker widget
|
# Date operations needed for datepicker widget
|
||||||
chrono = { version = "0.4", optional = true }
|
chrono = { version = "0.4", optional = true }
|
||||||
|
|
||||||
# Add support for loading images with the `image` crate.
|
## Add support for loading images with the [`image`](https://docs.rs/image) crate.
|
||||||
# You also need to ALSO opt-in to the image formats you want to support, like so:
|
##
|
||||||
# image = { version = "0.24", features = ["jpeg", "png"] }
|
## You also need to ALSO opt-in to the image formats you want to support, like so:
|
||||||
|
## ```toml
|
||||||
|
## image = { version = "0.24", features = ["jpeg", "png"] }
|
||||||
|
## ```
|
||||||
image = { version = "0.24", optional = true, default-features = false }
|
image = { version = "0.24", optional = true, default-features = false }
|
||||||
|
|
||||||
# svg feature
|
# svg feature
|
||||||
|
@ -61,3 +65,6 @@ serde = { version = "1", features = ["derive"], optional = true }
|
||||||
|
|
||||||
# feature "tracing"
|
# feature "tracing"
|
||||||
tracing = { version = "0.1", optional = true }
|
tracing = { version = "0.1", optional = true }
|
||||||
|
|
||||||
|
# Needed when generating the docs, but unfortunately also needed by `cargo check`
|
||||||
|
document-features = "0.2"
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
//! This is a crate that adds some features on top top of [`egui`](https://github.com/emilk/egui). This crate are for experimental features, and features that require big dependencies that does not belong in `egui`.
|
//! This is a crate that adds some features on top top of [`egui`](https://github.com/emilk/egui).
|
||||||
|
//!
|
||||||
|
//! This crate are for experimental features, and features that require big dependencies that does not belong in `egui`.
|
||||||
|
//!
|
||||||
|
//! ## Feature flags
|
||||||
|
#![doc = document_features::document_features!()]
|
||||||
|
//!
|
||||||
|
|
||||||
#![allow(clippy::float_cmp)]
|
#![allow(clippy::float_cmp)]
|
||||||
#![allow(clippy::manual_range_contains)]
|
#![allow(clippy::manual_range_contains)]
|
||||||
|
|
|
@ -26,18 +26,22 @@ all-features = true
|
||||||
[features]
|
[features]
|
||||||
default = ["clipboard", "links"]
|
default = ["clipboard", "links"]
|
||||||
|
|
||||||
# enable cut/copy/paste to OS clipboard.
|
## Enable cut/copy/paste to OS clipboard.
|
||||||
# if disabled a clipboard will be simulated so you can still copy/paste within the egui app.
|
##
|
||||||
|
## If disabled a clipboard will be simulated so you can still copy/paste within the egui app.
|
||||||
clipboard = ["egui-winit/clipboard"]
|
clipboard = ["egui-winit/clipboard"]
|
||||||
|
|
||||||
# enable opening links in a browser when an egui hyperlink is clicked.
|
## Enable opening links in a browser when an egui hyperlink is clicked.
|
||||||
links = ["egui-winit/links"]
|
links = ["egui-winit/links"]
|
||||||
|
|
||||||
# experimental support for a screen reader.
|
## Experimental support for a screen reader.
|
||||||
screen_reader = ["egui-winit/screen_reader"]
|
screen_reader = ["egui-winit/screen_reader"]
|
||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
# Needed when generating the docs, but unfortunately also needed by `cargo check`
|
||||||
|
document-features = "0.2"
|
||||||
|
|
||||||
egui = { version = "0.18.0", path = "../egui", default-features = false, features = [
|
egui = { version = "0.18.0", path = "../egui", default-features = false, features = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
] }
|
] }
|
||||||
|
@ -47,6 +51,5 @@ ahash = "0.7"
|
||||||
bytemuck = "1.7"
|
bytemuck = "1.7"
|
||||||
glium = "0.31"
|
glium = "0.31"
|
||||||
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
image = { version = "0.24", default-features = false, features = ["png"] }
|
image = { version = "0.24", default-features = false, features = ["png"] }
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
//! The main type you want to use is [`EguiGlium`].
|
//! The main type you want to use is [`EguiGlium`].
|
||||||
//!
|
//!
|
||||||
//! If you are writing an app, you may want to look at [`eframe`](https://docs.rs/eframe) instead.
|
//! If you are writing an app, you may want to look at [`eframe`](https://docs.rs/eframe) instead.
|
||||||
|
//!
|
||||||
|
//! ## Feature flags
|
||||||
|
#![doc = document_features::document_features!()]
|
||||||
|
//!
|
||||||
|
|
||||||
#![allow(clippy::float_cmp)]
|
#![allow(clippy::float_cmp)]
|
||||||
#![allow(clippy::manual_range_contains)]
|
#![allow(clippy::manual_range_contains)]
|
||||||
|
|
|
@ -26,26 +26,30 @@ all-features = true
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|
||||||
# for the winit integration:
|
## For the `winit` integration:
|
||||||
# enable cut/copy/paste to os clipboard.
|
## enable cut/copy/paste to os clipboard.
|
||||||
# if disabled a clipboard will be simulated so you can still copy/paste within the egui app.
|
##
|
||||||
|
## if disabled a clipboard will be simulated so you can still copy/paste within the egui app.
|
||||||
clipboard = ["egui-winit?/clipboard"]
|
clipboard = ["egui-winit?/clipboard"]
|
||||||
|
|
||||||
# for the winit integration:
|
## For the `winit` integration:
|
||||||
# enable opening links in a browser when an egui hyperlink is clicked.
|
## enable opening links in a browser when an egui hyperlink is clicked.
|
||||||
links = ["egui-winit?/links"]
|
links = ["egui-winit?/links"]
|
||||||
|
|
||||||
# experimental support for a screen reader.
|
## Experimental support for a screen reader.
|
||||||
screen_reader = ["egui-winit?/screen_reader"]
|
screen_reader = ["egui-winit?/screen_reader"]
|
||||||
|
|
||||||
# enable profiling with the puffin crate: https://github.com/embarkstudios/puffin
|
## Enable profiling with the [`puffin`](https://docs.rs/puffin) crate.
|
||||||
puffin = ["dep:puffin", "egui-winit?/puffin"]
|
puffin = ["dep:puffin", "egui-winit?/puffin"]
|
||||||
|
|
||||||
# enable winit integration.
|
## Enable [`winit`](https://docs.rs/winit) integration.
|
||||||
winit = ["egui-winit",]
|
winit = ["egui-winit",]
|
||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
# Needed when generating the docs, but unfortunately also needed by `cargo check`
|
||||||
|
document-features = "0.2"
|
||||||
|
|
||||||
egui = { version = "0.18.0", path = "../egui", default-features = false, features = [
|
egui = { version = "0.18.0", path = "../egui", default-features = false, features = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
] }
|
] }
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
//! The main types you want to look are are [`Painter`] and [`EguiGlow`].
|
//! The main types you want to look are are [`Painter`] and [`EguiGlow`].
|
||||||
//!
|
//!
|
||||||
//! If you are writing an app, you may want to look at [`eframe`](https://docs.rs/eframe) instead.
|
//! If you are writing an app, you may want to look at [`eframe`](https://docs.rs/eframe) instead.
|
||||||
|
//!
|
||||||
|
//! ## Feature flags
|
||||||
|
#![doc = document_features::document_features!()]
|
||||||
|
//!
|
||||||
|
|
||||||
#![allow(clippy::float_cmp)]
|
#![allow(clippy::float_cmp)]
|
||||||
#![allow(clippy::manual_range_contains)]
|
#![allow(clippy::manual_range_contains)]
|
||||||
|
|
|
@ -22,14 +22,23 @@ all-features = true
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|
||||||
# Enable additional checks if debug assertions are enabled (debug builds).
|
## Enable additional checks if debug assertions are enabled (debug builds).
|
||||||
extra_debug_asserts = []
|
extra_debug_asserts = []
|
||||||
# Always enable additional checks.
|
## Always enable additional checks.
|
||||||
extra_asserts = []
|
extra_asserts = []
|
||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# Optional:
|
#! ### Optional dependencies
|
||||||
|
|
||||||
|
## [`bytemuck`](https://docs.rs/bytemuck) enables you to cast `emath` types to `&[u8]`.
|
||||||
bytemuck = { version = "1.7.2", optional = true, features = ["derive"] }
|
bytemuck = { version = "1.7.2", optional = true, features = ["derive"] }
|
||||||
|
|
||||||
|
## [`mint`](https://docs.rs/mint) enables interopability 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 }
|
||||||
|
|
||||||
|
## Allow serialization using [`serde`](https://docs.rs/serde).
|
||||||
serde = { version = "1", optional = true, features = ["derive"] }
|
serde = { version = "1", optional = true, features = ["derive"] }
|
||||||
|
|
||||||
|
# Needed when generating the docs, but unfortunately also needed by `cargo check`
|
||||||
|
document-features = "0.2"
|
||||||
|
|
|
@ -14,6 +14,10 @@
|
||||||
//!
|
//!
|
||||||
//! For that, use something else ([`glam`](https://docs.rs/glam), [`nalgebra`](https://docs.rs/nalgebra), …)
|
//! For that, use something else ([`glam`](https://docs.rs/glam), [`nalgebra`](https://docs.rs/nalgebra), …)
|
||||||
//! and enable the `mint` feature flag in `emath` to enable implicit conversion to/from `emath`.
|
//! and enable the `mint` feature flag in `emath` to enable implicit conversion to/from `emath`.
|
||||||
|
//!
|
||||||
|
//! ## Feature flags
|
||||||
|
#![doc = document_features::document_features!()]
|
||||||
|
//!
|
||||||
|
|
||||||
#![allow(clippy::float_cmp)]
|
#![allow(clippy::float_cmp)]
|
||||||
#![allow(clippy::manual_range_contains)]
|
#![allow(clippy::manual_range_contains)]
|
||||||
|
|
|
@ -29,40 +29,49 @@ all-features = true
|
||||||
[features]
|
[features]
|
||||||
default = ["default_fonts"]
|
default = ["default_fonts"]
|
||||||
|
|
||||||
# implement bytemuck on most types.
|
## [`bytemuck`](https://docs.rs/bytemuck) enables you to cast [`Vertex`] to `&[u8]`.
|
||||||
bytemuck = ["dep:bytemuck", "emath/bytemuck"]
|
bytemuck = ["dep:bytemuck", "emath/bytemuck"]
|
||||||
|
|
||||||
# This will automatically detect deadlocks due to double-locking on the same thread.
|
## This will automatically detect deadlocks due to double-locking on the same thread.
|
||||||
# If your app freezes, you may want to enable this!
|
## If your app freezes, you may want to enable this!
|
||||||
# Only affects `epaint::mutex::RwLock` (which epaint and egui uses a lot).
|
## Only affects [`mutex::RwLock`] (which epaint and egui uses a lot).
|
||||||
deadlock_detection = ["dep:backtrace"]
|
deadlock_detection = ["dep:backtrace"]
|
||||||
|
|
||||||
# If set, epaint will use `include_bytes!` to bundle some fonts.
|
## If set, epaint will use `include_bytes!` to bundle some fonts.
|
||||||
# If you plan on specifying your own fonts you may disable this feature.
|
## If you plan on specifying your own fonts you may disable this feature.
|
||||||
default_fonts = []
|
default_fonts = []
|
||||||
|
|
||||||
# Enable additional checks if debug assertions are enabled (debug builds).
|
## Enable additional checks if debug assertions are enabled (debug builds).
|
||||||
extra_debug_asserts = ["emath/extra_debug_asserts"]
|
extra_debug_asserts = ["emath/extra_debug_asserts"]
|
||||||
# Always enable additional checks.
|
## Always enable additional checks.
|
||||||
extra_asserts = ["emath/extra_asserts"]
|
extra_asserts = ["emath/extra_asserts"]
|
||||||
|
|
||||||
# Add compatability with https://github.com/kvark/mint
|
## [`mint`](https://docs.rs/mint) enables interopability with other math libraries such as [`glam`](https://docs.rs/glam) and [`nalgebra`](https://docs.rs/nalgebra).
|
||||||
mint = ["emath/mint"]
|
mint = ["emath/mint"]
|
||||||
|
|
||||||
# implement serde on most types.
|
## Allow serialization using [`serde`](https://docs.rs/serde).
|
||||||
serde = ["dep:serde", "ahash/serde", "emath/serde"]
|
serde = ["dep:serde", "ahash/serde", "emath/serde"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
# Needed when generating the docs, but unfortunately also needed by `cargo check`
|
||||||
|
document-features = "0.2"
|
||||||
|
|
||||||
emath = { version = "0.18.0", path = "../emath" }
|
emath = { version = "0.18.0", path = "../emath" }
|
||||||
|
|
||||||
ab_glyph = "0.2.11"
|
ab_glyph = "0.2.11"
|
||||||
ahash = { version = "0.7", default-features = false, features = ["std"] }
|
ahash = { version = "0.7", default-features = false, features = ["std"] }
|
||||||
nohash-hasher = "0.2"
|
nohash-hasher = "0.2"
|
||||||
|
|
||||||
# Optional:
|
#! ### Optional dependencies
|
||||||
bytemuck = { version = "1.7.2", optional = true, features = ["derive"] }
|
bytemuck = { version = "1.7.2", optional = true, features = ["derive"] }
|
||||||
|
|
||||||
|
## [`cint`](https://docs.rs/cint) enables interopability with other color libraries.
|
||||||
cint = { version = "0.3.1", optional = true }
|
cint = { version = "0.3.1", optional = true }
|
||||||
|
|
||||||
|
## Enable the [`hex_color`] macro.
|
||||||
color-hex = { version = "0.2.0", optional = true }
|
color-hex = { version = "0.2.0", optional = true }
|
||||||
|
|
||||||
|
## Allow serialization using [`serde`](https://docs.rs/serde) .
|
||||||
serde = { version = "1", optional = true, features = ["derive", "rc"] }
|
serde = { version = "1", optional = true, features = ["derive", "rc"] }
|
||||||
|
|
||||||
# native:
|
# native:
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
//!
|
//!
|
||||||
//! Create some [`Shape`]:s and pass them to [`tessellate_shapes`] to generate [`Mesh`]:es
|
//! Create some [`Shape`]:s and pass them to [`tessellate_shapes`] to generate [`Mesh`]:es
|
||||||
//! that you can then paint using some graphics API of your choice (e.g. OpenGL).
|
//! that you can then paint using some graphics API of your choice (e.g. OpenGL).
|
||||||
|
//!
|
||||||
|
//! ## Feature flags
|
||||||
|
#![doc = document_features::document_features!()]
|
||||||
|
//!
|
||||||
|
|
||||||
#![allow(clippy::float_cmp)]
|
#![allow(clippy::float_cmp)]
|
||||||
#![allow(clippy::manual_range_contains)]
|
#![allow(clippy::manual_range_contains)]
|
||||||
|
|
Loading…
Reference in a new issue