tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5364Rust 86Markdown 12TOML 91822 Definitions

⎇ 66bcb10bff823bfde7828eeef133cb2fa7de7dba src/lib.rs Rust · 36 lines · 980 B History Who touched what raw

Replace per-node measure functions with a single measure function + per-node context (#490) be627e7fa · Nico Burns ·

1#![doc = include_str!("../README.md")]
2#![cfg_attr(not(feature = "std"), no_std)]
3#![deny(unsafe_code)]
4#![forbid(unsafe_code)]
5#![warn(missing_docs)]
6#![warn(clippy::missing_docs_in_private_items)]
7
8// We always need std for the tests
9// See <https://github.com/la10736/rstest/issues/149#issuecomment-1156402989>
10#[cfg(all(test, not(feature = "std")))]
11#[macro_use]
12extern crate std;
13
14#[cfg(all(not(feature = "std"), feature = "alloc"))]
15extern crate alloc;
16
17#[cfg_attr(feature = "serde", macro_use)]
18#[cfg(feature = "serde")]
19extern crate serde;
20
21pub mod compute;
22pub mod geometry;
23pub mod prelude;
24pub mod style;
25pub mod style_helpers;
26pub mod tree;
27pub mod util;
28
29#[cfg(feature = "flexbox")]
30pub use crate::compute::flexbox::FlexboxAlgorithm;
31#[cfg(feature = "grid")]
32pub use crate::compute::grid::CssGridAlgorithm;
33pub use crate::compute::LayoutAlgorithm;
34pub use crate::tree::LayoutTree;
35#[cfg(feature = "taffy_tree")]
36pub use crate::tree::{Taffy, TaffyError, TaffyResult};