1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 22:00:03 -04:00

Document feature flags using crate document-features (#1725)

This commit is contained in:
Emil Ernerfeldt
2022-06-09 15:27:22 +02:00
committed by GitHub
parent 218d4d4eea
commit 3169ce62d5
21 changed files with 193 additions and 83 deletions

View File

@@ -20,27 +20,30 @@ all-features = true
[features]
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"]
# enable cut/copy/paste to OS clipboard.
# if disabled a clipboard will be simulated so you can still copy/paste within the egui app.
## Enable cut/copy/paste to OS clipboard.
## If disabled a clipboard will be simulated so you can still copy/paste within the egui app.
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"]
# enable profiling with the puffin crate: https://github.com/EmbarkStudios/puffin
## Enable profiling with the [`puffin`](https://docs.rs/puffin) crate.
puffin = ["dep:puffin"]
# experimental support for a screen reader
## Experimental support for a screen reader.
screen_reader = ["tts"]
# to serialize `WindowSettings`
## Allow serialization of [`WindowSettings`] using [`serde`](https://docs.rs/serde).
serde = ["egui/serde", "dep:serde"]
[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 = [
"tracing",
] }

View File

@@ -2,6 +2,10 @@
//!
//! The library translates winit events to egui, handled copy/paste,
//! updates the cursor, open links clicked in egui, etc.
//!
//! ## Feature flags
#![doc = document_features::document_features!()]
//!
#![allow(clippy::manual_range_contains)]