gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5364Rust 86Markdown 12TOML 91841 Sutichaykuna

⎇ 60ce2c2cb1d22e92a4a2e0585c3c9062d2262eff Cargo.toml TOML · 113 siq'ikuna · 3.5 KB Ñawpa willay ch'uya

Prepare for v0.9.2 release (#891) 8f30e3941 · Nico Burns ·

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