-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
659c4fb
commit 53a6378
Showing
14 changed files
with
360 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
[package] | ||
name = "taffy" | ||
version = "0.5.1" | ||
version = "0.5.2" | ||
authors = [ | ||
"Alice Cecile <[email protected]>", | ||
"Johnathan Kelley <[email protected]>", | ||
"Nico Burns <[email protected]>", | ||
] | ||
edition = "2021" | ||
rust-version = "1.65" | ||
include = ["src/**/*", "Cargo.toml", "README.md"] | ||
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"] | ||
|
@@ -17,50 +17,69 @@ 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 = ["rc", "serde_derive"] } | ||
serde = { version = "1.0", default-features = false, optional = true, features = [ | ||
"serde_derive", "rc" | ||
] } | ||
slotmap = { version = "1.0.6", default-features = false, optional = true } | ||
grid = { version = "0.14.0", default-features = false, optional = true } | ||
sptr = { version = "0.3.2", optional = true } | ||
|
||
### FEATURES ################################################################# | ||
[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 | ||
|
||
[features] | ||
default = ["std", "taffy_tree", "flexbox", "grid", "block_layout", "content_size", "calc"] | ||
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"] | ||
|
||
### Algorithms | ||
[features] | ||
default = [ | ||
"std", | ||
"taffy_tree", | ||
"flexbox", | ||
"grid", | ||
"block_layout", | ||
"content_size", | ||
"calc", | ||
] | ||
#! ## Feature Flags | ||
#! | ||
#! ### Algorithms | ||
|
||
# Enables the Block layout algorithm | ||
## Enables the Block layout algorithm. See [`compute_block_layout`](crate::compute_block_layout). | ||
block_layout = [] | ||
# Enables the Flexbox layout algorithm | ||
## Enables the Flexbox layout algorithm. See [`compute_flexbox_layout`](crate::compute_flexbox_layout). | ||
flexbox = [] | ||
# Enables the CSS Grid layout algorithm | ||
## 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 | ||
## Causes all algorithms to compute and output a content size for each node | ||
content_size = [] | ||
|
||
### Taffy Tree | ||
#! ### Taffy Tree | ||
|
||
# Enable the built-in Taffy node tree | ||
## Enable the built-in Taffy node tree. See [`TaffyTree`](crate::TaffyTree). | ||
taffy_tree = ["dep:slotmap"] | ||
|
||
### Other | ||
#! ### Other | ||
|
||
# Add css calc to sizes | ||
calc = ["alloc", "dep:sptr"] | ||
# Add serde derives to Style structs | ||
## Add [`serde`] derives to Style structs | ||
serde = ["dep:serde"] | ||
# Allow Taffy to depend on the standard library | ||
## 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 | ||
## Allow Taffy to depend on the alloc library | ||
alloc = ["serde?/alloc"] | ||
# Internal feature for debugging | ||
## Internal feature for debugging | ||
debug = ["std"] | ||
# Internal feature for profiling | ||
## Internal feature for profiling | ||
profile = ["std"] | ||
|
||
[dev-dependencies] | ||
cosmic-text = "0.11.2" | ||
cosmic-text = "0.12" | ||
serde_json = "1.0.93" | ||
|
||
# Enable default features for tests and examples | ||
|
@@ -75,5 +94,15 @@ 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"] | ||
members = [ | ||
"scripts/gentest", | ||
"scripts/format-fixtures", | ||
"scripts/import-yoga-tests", | ||
"benches", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.