gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 501HTML 254C 19JavaScript 81414 Sutichaykuna

⎇ b9067e74319fef46a5d726f0558308e114ee890e Cargo.toml TOML · 121 siq'ikuna · 3.9 KB Ñawpa willay ch'uya

Prepare for 0.12.1 release (#973) 1c9e37a0a · Nico Burns ·

1[package]
2name = "taffy"
3version = "0.12.1"
4authors = [
5    "Alice Cecile <alice.i.cecile@gmail.com>",
6    "Johnathan Kelley <jkelleyrtp@gmail.com>",
7    "Nico Burns <nico@nicoburns.com>",
8]
9edition = "2021"
10rust-version = "1.71"
11include = ["src/**/*", "examples/**/*", "Cargo.toml", "README.md"]
12description = "A flexible UI layout library "
13repository = "https://github.com/DioxusLabs/taffy"
14keywords = ["cross-platform", "layout", "flexbox", "css-grid", "grid"]
15categories = ["gui"]
16license = "MIT"
17
18[dependencies]
19arrayvec = { version = "0.7", default-features = false }
20document-features = { version = "0.2.7", optional = true }
21serde = { version = "1.0", default-features = false, optional = true, features = ["serde_derive"] }
22slotmap = { version = "1.0.6", default-features = false, optional = true }
23grid = { version = "1.0.0", default-features = false, optional = true }
24cssparser = { version = "0.37.0", default-features = false, optional = true }
25
26[package.metadata.docs.rs]
27# To test all the documentation related features, run:
28# RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc -Zunstable-options -Zrustdoc-scrape-examples --all-features --no-deps --open
29
30all-features = true
31# see https://doc.rust-lang.org/nightly/rustdoc/scraped-examples.html
32cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
33rustdoc-args = ["--cfg", "docsrs"]
34
35[features]
36default = [
37    "std",
38    "taffy_tree",
39    "flexbox",
40    "grid",
41    "block_layout",
42    "float_layout",
43    "calc",
44    "content_size",
45    "detailed_layout_info",
46]
47#! ## Feature Flags
48#!
49#! ### Algorithms
50
51## Enables the Block layout algorithm. See [`compute_block_layout`](crate::compute_block_layout).
52block_layout = []
53## Enables the Float layout algorithm. This is a sub-feature of block layout.
54float_layout = []
55## Enables the Flexbox layout algorithm. See [`compute_flexbox_layout`](crate::compute_flexbox_layout).
56flexbox = []
57## Enables the CSS Grid layout algorithm. See [`compute_grid_layout`](crate::compute_grid_layout).
58grid = ["alloc", "dep:grid"]
59## Enables calc() values for all layout algorithms
60calc = []
61## Causes all algorithms to compute and output a content size for each node
62content_size = []
63## Causes algorithms to stores detailed information of the nodes in TaffyTree, with only CSS Grid supporting this.
64detailed_layout_info = []
65## Use strict provenance APIs for pointer manipulation. Using this feature requires Rust 1.84 or higher.
66strict_provenance = []
67
68#! ### Taffy Tree
69
70## Enable the built-in Taffy node tree. See [`TaffyTree`](crate::TaffyTree).
71taffy_tree = ["dep:slotmap"]
72
73#! ### Other
74
75## Add [`serde`] derives to Style structs
76serde = ["dep:serde"]
77## Implement `FromStr` trait for Taffy style types
78parse = ["dep:cssparser"]
79## Enable the `parse` feature with proc-macro dependent optimisations
80parse_faster = ["parse", "cssparser/fast_match_byte"]
81## Allow Taffy to depend on the [`Rust Standard Library`](std)
82std = ["grid?/std", "serde?/std", "slotmap?/std"]
83## Allow Taffy to depend on the alloc library
84alloc = ["serde?/alloc"]
85## Internal feature for debugging
86debug = ["std"]
87## Internal feature for profiling
88profile = ["std"]
89
90[dev-dependencies]
91serde_json = "1.0.93"
92roxmltree = "0.21.1"
93taffy_test_helpers = { path = "tests/common"}
94
95# Enable default features for tests and examples
96taffy = { path = ".", features = ["parse"] }
97
98[profile.release]
99lto = true
100panic = 'abort'
101
102[[bench]]
103name = "dummy_benchmark"
104path = "benches/dummy_benchmark.rs"
105harness = false
106
107[[example]]
108name = "basic"
109# This causes all the examples to be scraped for documentation, not just the basic example
110doc-scrape-examples = true
111
112[workspace]
113members = [
114    "scripts/gentest",
115    "scripts/format-fixtures",
116    "scripts/import-yoga-tests",
117    "tests/common",
118]
119# The cosmic_text example and benches are excluded from the workspace as including them breaks compilation
120# of all crates in the workspace with our MSRV compiler
121exclude = ["examples/cosmic_text", "benches"]