-
Notifications
You must be signed in to change notification settings - Fork 112
/
Cargo.toml
104 lines (89 loc) · 3.01 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
[package]
name = "taffy"
version = "0.7.0"
authors = [
"Alice Cecile <[email protected]>",
"Johnathan Kelley <[email protected]>",
"Nico Burns <[email protected]>",
]
edition = "2021"
rust-version = "1.65"
include = ["src/**/*", "examples/**/*", "Cargo.toml", "README.md"]
description = "A flexible UI layout library "
repository = "https://github.com/DioxusLabs/taffy"
keywords = ["cross-platform", "layout", "flexbox", "css-grid", "grid"]
categories = ["gui"]
license = "MIT"
[dependencies]
arrayvec = { version = "0.7", default-features = false }
document-features = { version = "0.2.7", optional = true }
num-traits = { version = "0.2", default-features = false }
serde = { version = "1.0", default-features = false, optional = true, features = [
"serde_derive",
] }
slotmap = { version = "1.0.6", default-features = false, optional = true }
grid = { version = "0.15.0", default-features = false, optional = true }
[package.metadata.docs.rs]
# To test all the documentation related features, run:
# RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc -Zunstable-options -Zrustdoc-scrape-examples --all-features --no-deps --open
all-features = true
# see https://doc.rust-lang.org/nightly/rustdoc/scraped-examples.html
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
rustdoc-args = ["--cfg", "docsrs"]
[features]
default = [
"std",
"taffy_tree",
"flexbox",
"grid",
"block_layout",
"content_size",
]
#! ## Feature Flags
#!
#! ### Algorithms
## Enables the Block layout algorithm. See [`compute_block_layout`](crate::compute_block_layout).
block_layout = []
## Enables the Flexbox layout algorithm. See [`compute_flexbox_layout`](crate::compute_flexbox_layout).
flexbox = []
## Enables the CSS Grid layout algorithm. See [`compute_grid_layout`](crate::compute_grid_layout).
grid = ["alloc", "dep:grid"]
## Causes all algorithms to compute and output a content size for each node
content_size = []
#! ### Taffy Tree
## Enable the built-in Taffy node tree. See [`TaffyTree`](crate::TaffyTree).
taffy_tree = ["dep:slotmap"]
#! ### Other
## Add [`serde`] derives to Style structs
serde = ["dep:serde"]
## Allow Taffy to depend on the [`Rust Standard Library`](std)
std = ["num-traits/std", "grid?/std", "serde?/std", "slotmap?/std"]
## Allow Taffy to depend on the alloc library
alloc = ["serde?/alloc"]
## Internal feature for debugging
debug = ["std"]
## Internal feature for profiling
profile = ["std"]
[dev-dependencies]
serde_json = "1.0.93"
taffy_test_helpers = { path = "tests/common"}
# Enable default features for tests and examples
taffy = { path = "." }
[profile.release]
lto = true
panic = 'abort'
[[bench]]
name = "dummy_benchmark"
path = "benches/dummy_benchmark.rs"
harness = false
[[example]]
name = "basic"
# This causes all the examples to be scraped for documentation, not just the basic example
doc-scrape-examples = true
[workspace]
members = [
"scripts/gentest",
"scripts/format-fixtures",
"scripts/import-yoga-tests",
"benches", "examples/cosmic_text", "tests/common",
]