1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30: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

@@ -22,14 +22,23 @@ all-features = true
[features]
default = []
# Enable additional checks if debug assertions are enabled (debug builds).
## Enable additional checks if debug assertions are enabled (debug builds).
extra_debug_asserts = []
# Always enable additional checks.
## Always enable additional checks.
extra_asserts = []
[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"] }
## [`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 }
## Allow serialization using [`serde`](https://docs.rs/serde).
serde = { version = "1", optional = true, features = ["derive"] }
# Needed when generating the docs, but unfortunately also needed by `cargo check`
document-features = "0.2"

View File

@@ -14,6 +14,10 @@
//!
//! 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`.
//!
//! ## Feature flags
#![doc = document_features::document_features!()]
//!
#![allow(clippy::float_cmp)]
#![allow(clippy::manual_range_contains)]