diff --git a/packages/native-core/Cargo.toml b/packages/native-core/Cargo.toml index 5e8d7d94b..1d5a09a59 100644 --- a/packages/native-core/Cargo.toml +++ b/packages/native-core/Cargo.toml @@ -14,18 +14,16 @@ keywords = ["dom", "ui", "gui", "react"] dioxus-core = { workspace = true, optional = true } keyboard-types = "0.6.2" -taffy = "0.3.12" smallvec = "1.6" rustc-hash = { workspace = true } anymap = "1.0.0-beta.2" slab = { workspace = true } parking_lot = { version = "0.12.1", features = ["send_guard"] } -crossbeam-deque = "0.8.2" dashmap = "5.4.0" -hashbrown = { version = "0.13.2", features = ["raw"] } # for parsing attributes -lightningcss = "1.0.0-alpha.39" +taffy = { version = "0.3.12", optional = true } +lightningcss = { version = "1.0.0-alpha.39", optional = true } rayon = "1.6.1" shipyard = { version = "0.6.2", features = ["proc", "std"], default-features = false } @@ -39,5 +37,6 @@ dioxus-native-core-macro = { workspace = true } [features] default = [] +layout-attributes = ["dep:taffy", "dep:lightningcss"] dioxus = ["dioxus-core"] parallel = ["shipyard/parallel"] diff --git a/packages/native-core/src/lib.rs b/packages/native-core/src/lib.rs index 0740d881a..5a88ff205 100644 --- a/packages/native-core/src/lib.rs +++ b/packages/native-core/src/lib.rs @@ -9,6 +9,7 @@ use rustc_hash::FxHasher; #[cfg(feature = "dioxus")] pub mod dioxus; +#[cfg(feature = "layout-attributes")] pub mod layout_attributes; pub mod node; pub mod node_ref; diff --git a/packages/rink/Cargo.toml b/packages/rink/Cargo.toml index a339d6ea1..a820a85ed 100644 --- a/packages/rink/Cargo.toml +++ b/packages/rink/Cargo.toml @@ -14,7 +14,7 @@ license = "MIT/Apache-2.0" [dependencies] dioxus-html = { workspace = true } -dioxus-native-core = { workspace = true } +dioxus-native-core = { workspace = true, features = ["layout-attributes"] } dioxus-native-core-macro = { workspace = true } tui = "0.17.0"