mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
Refactor and simplify feature flags
This commit is contained in:
@@ -21,10 +21,9 @@ all-features = true
|
||||
|
||||
[features]
|
||||
default = []
|
||||
# Enable the file_storage module for storing data to disk.
|
||||
file_storage = ["directories-next", "ron", "serde"]
|
||||
|
||||
# Persist native window options and egui memory
|
||||
persistence = ["ron", "serde", "egui/persistence"]
|
||||
persistence = ["directories-next", "ron", "serde", "egui/persistence"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
@@ -33,6 +32,9 @@ glow = "0.11"
|
||||
tracing = "0.1"
|
||||
|
||||
# Optional:
|
||||
directories-next = { version = "2", optional = true }
|
||||
ron = { version = "0.7", optional = true }
|
||||
serde = { version = "1", optional = true }
|
||||
|
||||
# native:
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
directories-next = { version = "2", optional = true }
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
#![warn(missing_docs)] // Let's keep `epi` well-documented.
|
||||
|
||||
/// File storage which can be used by native backends.
|
||||
#[cfg(feature = "file_storage")]
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
#[cfg(feature = "persistence")]
|
||||
pub mod file_storage;
|
||||
|
||||
pub use egui; // Re-export for user convenience
|
||||
|
||||
Reference in New Issue
Block a user