tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 707HTML 660Markdown 12TOML 62344 Sutichaykuna

⎇ 859cd5182556840aff0fbdcdf1635c3df028e321 Cargo.toml TOML · 106 siq'ikuna · 3.1 KB Ñawpa willay ch'uya

Add API to expose computed grid information (#772) 859cd5182 · Steven Novaryo ·

1[package]
2name = "taffy"
3version = "0.7.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.65"
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 = [
22    "serde_derive",
23] }
24slotmap = { version = "1.0.6", default-features = false, optional = true }
25grid = { version = "0.15.0", default-features = false, optional = true }
26
27[package.metadata.docs.rs]
28# To test all the documentation related features, run:
29# RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc -Zunstable-options -Zrustdoc-scrape-examples --all-features --no-deps --open
30
31all-features = true
32# see https://doc.rust-lang.org/nightly/rustdoc/scraped-examples.html
33cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
34rustdoc-args = ["--cfg", "docsrs"]
35
36[features]
37default = [
38    "std",
39    "taffy_tree",
40    "flexbox",
41    "grid",
42    "block_layout",
43    "content_size",
44    "detailed_layout_info",
45]
46#! ## Feature Flags
47#!
48#! ### Algorithms
49
50## Enables the Block layout algorithm. See [`compute_block_layout`](crate::compute_block_layout).
51block_layout = []
52## Enables the Flexbox layout algorithm. See [`compute_flexbox_layout`](crate::compute_flexbox_layout).
53flexbox = []
54## Enables the CSS Grid layout algorithm. See [`compute_grid_layout`](crate::compute_grid_layout).
55grid = ["alloc", "dep:grid"]
56## Causes all algorithms to compute and output a content size for each node
57content_size = []
58## Causes algorithms to stores detailed information of the nodes in TaffyTree, with only CSS Grid supporting this.
59detailed_layout_info = []
60
61#! ### Taffy Tree
62
63## Enable the built-in Taffy node tree. See [`TaffyTree`](crate::TaffyTree).
64taffy_tree = ["dep:slotmap"]
65
66#! ### Other
67
68## Add [`serde`] derives to Style structs
69serde = ["dep:serde"]
70## Allow Taffy to depend on the [`Rust Standard Library`](std)
71std = ["grid?/std", "serde?/std", "slotmap?/std"]
72## Allow Taffy to depend on the alloc library
73alloc = ["serde?/alloc"]
74## Internal feature for debugging
75debug = ["std"]
76## Internal feature for profiling
77profile = ["std"]
78
79[dev-dependencies]
80serde_json = "1.0.93"
81taffy_test_helpers = { path = "tests/common"}
82
83# Enable default features for tests and examples
84taffy = { path = "." }
85
86[profile.release]
87lto = true
88panic = 'abort'
89
90[[bench]]
91name = "dummy_benchmark"
92path = "benches/dummy_benchmark.rs"
93harness = false
94
95[[example]]
96name = "basic"
97# This causes all the examples to be scraped for documentation, not just the basic example
98doc-scrape-examples = true
99
100[workspace]
101members = [
102    "scripts/gentest",
103    "scripts/format-fixtures",
104    "scripts/import-yoga-tests",
105    "benches", "examples/cosmic_text", "tests/common",
106]