Skip to content

Commit

Permalink
Configure deps
Browse files Browse the repository at this point in the history
  • Loading branch information
matthunz committed Nov 18, 2024
1 parent ef30a32 commit a309a37
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repository = "https://github.com/actuate-rs/actuate"
event-loop = ["dep:winit"]
rt = ["tokio/rt-multi-thread"]
tracing = ["dep:tracing"]
ui = []
ui = ["event-loop", "dep:parley", "dep:peniko", "dep:pollster", "dep:taffy", "dep:vello"]
default = ["event-loop", "rt", "tracing", "ui"]

[workspace]
Expand All @@ -21,15 +21,15 @@ members = [

[dependencies]
actuate-macros = { version = "0.1.3", path = "crates/actuate-macros" }
parley = "0.2.0"
peniko = "0.2.0"
pollster = "0.4.0"
parley = { version = "0.2.0", optional = true }
peniko = { version = "0.2.0", optional = true }
pollster = { version = "0.4.0", optional = true }
slotmap = "1.0.7"
taffy = "0.6.1"
taffy = { version = "0.6.1", optional = true }
thiserror = "2.0.3"
tracing = { version = "0.1.40", optional = true }
tokio = { version = "1.41.1", features = ["sync"] }
vello = "0.3.0"
vello = { version = "0.3.0", optional = true }
winit = { version = "0.30.5", optional = true }

[dev-dependencies]
Expand Down
16 changes: 16 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
//! Hooks must be used in the same order for every re-compose.
//! Don’t use hooks inside loops, conditions, nested functions, or match blocks.
//! Instead, always use hooks at the top level of your composable, before any early returns.
//!
//! ## Features
//! - `event-loop`: Enables the `event_loop` module for access to the system event loop.
//! - `rt`: Enables the `rt` module for running async tasks on the Tokio runtime.
//! - `tracing`: Enables the `tracing` module for logging.
//! - `ui`: Enables the `ui` module for building user interfaces.
#![cfg_attr(docsrs, feature(doc_cfg))]

Expand Down Expand Up @@ -41,17 +47,27 @@ pub mod prelude {

pub use crate::compose::{self, Compose, DynCompose, Memo};

#[cfg(feature = "ui")]
#[cfg_attr(docsrs, doc(cfg(feature = "ui")))]
pub use crate::ui::{
view::{use_font, Canvas, Flex, Text, View, Window},
Draw,
};

#[cfg(feature = "ui")]
#[cfg_attr(docsrs, doc(cfg(feature = "ui")))]
pub use parley::GenericFamily;

#[cfg(feature = "ui")]
#[cfg_attr(docsrs, doc(cfg(feature = "ui")))]
pub use taffy::prelude::*;

#[cfg(feature = "ui")]
#[cfg_attr(docsrs, doc(cfg(feature = "ui")))]
pub use vello::peniko::Color;

#[cfg(feature = "event-loop")]
#[cfg_attr(docsrs, doc(cfg(feature = "event-loop")))]
pub use winit::window::WindowAttributes;
}

Expand Down

0 comments on commit a309a37

Please sign in to comment.