Skip to main content

frus_layout/
lib.rs

1//! `frus-layout` — frus's layout engine.
2//!
3//! It turns a **tree of styled nodes** into **positioned rectangles**, in absolute
4//! coordinates, ready for `frus-gpu` to draw.
5//!
6//! The implementation rests on [`taffy`](https://docs.rs/taffy) for flexbox, but
7//! taffy is **entirely hidden** behind frus's own API, so it can be replaced later
8//! without breaking anything public.
9
10#![deny(missing_docs)]
11
12// The README's example is compiled and run by `cargo test --doc`, so it cannot rot.
13#[cfg(doctest)]
14#[doc = include_str!("../README.md")]
15pub struct ReadmeDoctests;
16
17mod style;
18mod tree;
19
20pub use style::{Align, AlignContent, Dimension, FlexDirection, Justify, Style};
21pub use tree::{Layout, MeasureFn, NodeId, Overflowing, Side};
22
23// Re-export of the core geometry types, as a convenience for callers.
24pub use frus_core::{Rect, Size};