mirror of
https://github.com/danbulant/cushy
synced 2026-06-18 22:11:34 +00:00
map_each previously was written such that if a chain of mappings fed each other, a deadlock could occur because while the first one was mapped, the second callback gets invoked and tries to update the first value while it's still being held. This refactor switches from std Mutex to parking_lot, allowing me to remove a workaround for needing to run drop callbacks in a separate thread during the drop of a DynamicGuard. In addition to that change, the lower level `map_generational` calls now take a DynamicGuard as their parameter. This allows these functions to drop ownership of the referenced data during the callback. The map_each implementation takes advantage of this by ensuring that the guard is dropped before set is invoked, minimizing potential lock overlaps. With this refactor, some old code of mine with complex validations now works again.
78 lines
2 KiB
TOML
78 lines
2 KiB
TOML
[workspace]
|
|
members = ["cushy-macros", "guide/guide-examples"]
|
|
|
|
[package]
|
|
name = "cushy"
|
|
version = "0.2.0"
|
|
edition = "2021"
|
|
description = "A wgpu-powered graphical user interface (GUI) library with a reactive data model"
|
|
repository = "https://github.com/khonsulabs/cushy"
|
|
license = "MIT OR Apache-2.0"
|
|
keywords = ["gui", "ui", "widgets", "reactive"]
|
|
categories = ["gui"]
|
|
readme = "./README.md"
|
|
rust-version = "1.70.0"
|
|
|
|
[features]
|
|
default = ["tracing-output", "roboto-flex"]
|
|
tracing-output = ["dep:tracing-subscriber"]
|
|
roboto-flex = []
|
|
plotters = ["dep:plotters", "kludgine/plotters"]
|
|
|
|
[dependencies]
|
|
# kludgine = { version = "0.7.0", features = ["app"] }
|
|
kludgine = { git = "https://github.com/khonsulabs/kludgine", features = [
|
|
"app",
|
|
] }
|
|
figures = { version = "0.2.1", git = "https://github.com/khonsulabs/figures" }
|
|
alot = "0.3"
|
|
interner = "0.2.1"
|
|
kempt = "0.2.1"
|
|
intentional = "0.1.0"
|
|
tracing = "0.1.40"
|
|
|
|
tracing-subscriber = { version = "0.3", optional = true, features = [
|
|
"env-filter",
|
|
] }
|
|
palette = "0.7.3"
|
|
ahash = "0.8.6"
|
|
cushy-macros = { version = "0.2.0", path = "cushy-macros" }
|
|
arboard = "3.2.1"
|
|
zeroize = "1.6.1"
|
|
unicode-segmentation = "1.10.1"
|
|
pollster = "0.3.0"
|
|
png = "0.17.10"
|
|
image = { version = "0.25.0", features = ["png"] }
|
|
plotters = { version = "0.3.5", default-features = false, optional = true }
|
|
nominals = "0.3.0"
|
|
parking_lot = "0.12.1"
|
|
|
|
|
|
# [patch.crates-io]
|
|
# cosmic-text = { path = "../cosmic-text" }
|
|
# appit = { path = "../appit" }
|
|
# figures = { path = "../figures" }
|
|
# alot = { git = "https://github.com/khonsulabs/alot" }
|
|
# kempt = { path = "../objectmap" }
|
|
|
|
# [patch."https://github.com/khonsulabs/kludgine"]
|
|
# kludgine = { path = "../kludgine" }
|
|
# [patch."https://github.com/khonsulabs/appit"]
|
|
# appit = { path = "../appit" }
|
|
# [patch."https://github.com/khonsulabs/figures"]
|
|
# figures = { path = "../figures" }
|
|
|
|
[profile.dev.package."*"]
|
|
opt-level = 2
|
|
|
|
[dev-dependencies]
|
|
rand = "0.8.5"
|
|
|
|
[[example]]
|
|
name = "plotters"
|
|
required-features = ["plotters"]
|
|
|
|
[profile.release]
|
|
# debug = true
|
|
# opt-level = "s"
|
|
# strip = "debuginfo"
|