gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 501HTML 254C 19JavaScript 81414 Sutichaykuna

Make `serde` dependency compatible with `no_std` environments (#592)

* Make `serde` dependency compatible with `no_std` environments

* add release note

03b51321099e6760620ac0be1492db842f7773fe · ruwaq Conall Keane · (2 wata ñawpaq) · tayta 1ed47cb03 · kay commitpi sach'ata qhaway

Semántico sayk'uy

Mana ima sutichaypas t'ikrakurqanchu: qillqalla, yachachiylla utaq willaylla t'ikrakurqan.

2 qillqakuna · +4 −3

diff --git a/Cargo.toml b/Cargo.toml
index e3ea062ed..348f79457 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,7 +17,7 @@ license = "MIT"
 [dependencies]
 arrayvec = { version = "0.7", default-features = false }
 num-traits = { version = "0.2", default-features = false }
-serde = { version = "1.0", optional = true, features = ["serde_derive"] }
+serde = { version = "1.0", default-features = false, optional = true, features = ["serde_derive"] }
 slotmap = { version = "1.0.6", optional = true }
 grid = { version = "0.12.0", default-features = false, optional = true }
 
@@ -47,9 +47,9 @@ taffy_tree = ["dep:slotmap"]
 # Add serde derives to Style structs
 serde = ["dep:serde"]
 # Allow Taffy to depend on the standard library
-std = ["num-traits/std", "grid?/std"]
+std = ["num-traits/std", "grid?/std", "serde?/std"]
 # Allow Taffy to depend on the alloc library
-alloc = []
+alloc = ["serde?/alloc"]
 # Internal featyre for debugging
 debug = ["std"]
 # Internal feature for profiling
diff --git a/RELEASES.md b/RELEASES.md
index 2bfb2c3b3..5926e857c 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -110,6 +110,7 @@ Example usage change:
   - The debug module is no longer public. The `print_tree` function is now accesible under `util`.
   - All types from the `node`, `data`, `layout`, `error` and `cache` modules have been moved to the  the `tree` module.
 - Fixed misspelling: `RunMode::PeformLayout` renamed into `RunMode::PerformLayout` (added missing `r`).
+- `serde` dependency has been made compatible with `no_std` environments
 
 ## 0.3.18