Add `taffy_tree` feature to opt-out of default Taffy tree (#448)
1[package]
2name = "taffy"
3version = "0.3.11"
4authors = [
5 "Alice Cecile <alice.i.cecile@gmail.com>",
6 "Johnathan Kelley <jkelleyrtp@gmail.com>",
7]
8edition = "2021"
9include = ["src/**/*", "Cargo.toml", "README.md"]
10description = "A flexible UI layout library "
11repository = "https://github.com/DioxusLabs/taffy"
12keywords = ["cross-platform", "layout", "flexbox", "css-grid", "grid"]
13categories = ["gui"]
14license = "MIT"
15
16[dependencies]
17arrayvec = { version = "0.7", default-features = false }
18num-traits = { version = "0.2", default-features = false }
19rand = { version = "0.8.5", optional = true }
20serde = { version = "1.0", optional = true, features = ["serde_derive"] }
21slotmap = { version = "1.0.6", optional = true }
22grid = { version = "0.9.0", optional = true }
23
24[features]
25default = ["std", "flexbox", "grid", "taffy_tree"]
26flexbox = []
27grid = ["alloc", "dep:grid"]
28alloc = []
29std = ["num-traits/std"]
30serde = ["dep:serde"]
31random = ["dep:rand"]
32yoga_benchmark = []
33debug = []
34profile = []
35taffy_tree = ["dep:slotmap"]
36
37[dev-dependencies]
38criterion = "0.4"
39rstest = "0.17.0"
40rand = "0.8.5"
41rand_chacha = "0.3.1"
42yoga = "0.4.0"
43ordered-float = "3.4.0"
44serde_json = "1.0.93"
45
46# Enable example and test-specific features
47taffy = { path = ".", features = ["random"] }
48
49[profile.release]
50lto = true
51panic = 'abort'
52
53[[bench]]
54name = "tree_creation"
55path = "benches/tree_creation.rs"
56harness = false
57
58[[bench]]
59name = "flexbox"
60path = "benches/flexbox.rs"
61harness = false
62
63[[bench]]
64name = "grid"
65path = "benches/grid.rs"
66harness = false
67
68[workspace]
69members = ["scripts/gentest", "scripts/import-yoga-tests"]