-
Notifications
You must be signed in to change notification settings - Fork 3
/
Cargo.toml
201 lines (169 loc) · 7.15 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
[workspace]
members = ["MoonZoon/crates/*"]
resolver = "2"
[package]
name = "haalka"
version = "0.2.3"
edition = "2021"
categories = ["asynchronous", "gui", "game-development"]
description = "ergonomic reactive Bevy UI library powered by FRP signals"
exclude = [".github/", ".vscode/", "MoonZoon/"]
keywords = ["ui", "reactive", "signals", "gamedev", "bevy"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/databasedav/haalka"
documentation = "https://docs.rs/haalka"
[lints.rust]
missing_docs = "warn"
unsafe_code = "deny"
[package.metadata.docs.rs]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
all-features = true
[dependencies]
bevy_app = "0.14"
bevy_ecs = { version = "0.14", features = ["multi_threaded"] }
bevy_hierarchy = "0.14"
bevy_tasks = { version = "0.14", features = ["multi_threaded"] }
bevy_utils = "0.14"
bevy_color = { version = "0.14", optional = true, default-features = false }
bevy_core = { version = "0.14", optional = true, default-features = false }
bevy_input = { version = "0.14", optional = true, default-features = false }
bevy_log = { version = "0.14", optional = true, default-features = false }
bevy_math = { version = "0.14", optional = true, default-features = false }
bevy_reflect = { version = "0.14", optional = true, default-features = false }
bevy_render = { version = "0.14", optional = true, default-features = false, features = ["webgl"] }
bevy_text = { version = "0.14", optional = true, default-features = false }
bevy_transform = { version = "0.14", optional = true, default-features = false }
bevy_ui = { version = "0.14", optional = true, default-features = false, features = ["bevy_text"] }
bevy_window = { version = "0.14", optional = true, default-features = false }
bevy_derive = { version = "0.14", optional = true, default-features = false }
bevy_dev_tools = { version = "0.14", optional = true, features = ["bevy_ui_debug"] }
bevy_cosmic_edit = { version = "0.25", optional = true }
bevy_eventlistener = "0.8"
bevy_mod_picking = { version = "0.20", default-features = false, features = ["backend_bevy_ui"], optional = true }
bevy-async-ecs = "0.6"
apply = "0.3"
cfg-if = "1.0"
enclose = "1.1"
futures-signals = "0.3"
once_cell = "1.19"
paste = { version = "1.0", optional = true }
document-features = { version = "0.2", optional = true }
# TODO: use MoonZoon's futures-signals/futures-util extensions directly when it is published as a crate
haalka_futures_signals_ext = { path = "MoonZoon/crates/futures_signals_ext", version = "0.0.2" }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
async-io = "2.3"
[target.'cfg(target_arch = "wasm32")'.dependencies]
gloo-timers = { version = "0.3", features = ["futures"] }
send_wrapper = { version = "0.6", features = ["futures"] }
bevy_winit = { version = "0.14", optional = true }
bevy_audio = { version = "0.14", optional = true, features = ["android_shared_stdcxx"] }
bevy_core_pipeline = { version = "0.14", optional = true, default-features = false, features = ["webgl"] }
bevy_pbr = { version = "0.14", optional = true, default-features = false, features = ["webgl"] }
bevy_gizmos = { version = "0.14", optional = true, default-features = false, features = ["webgl"] }
bevy_sprite = { version = "0.14", optional = true, default-features = false, features = ["webgl"] }
[features]
default = [
"text_input",
"utils",
]
## High level UI abstractions integrated with signals.
ui = ["bevy_core", "bevy_ui", "bevy_render", "bevy_text", "bevy_transform", "bevy_mod_picking", "bevy_log", "bevy_window", "bevy_reflect", "bevy_derive", "bevy_input", "bevy_math", "derive"]
## [bevy_cosmic_edit](https://github.com/Dimchikkk/bevy_cosmic_edit) text input widget integrated with signals.
text_input = ["ui", "bevy_color", "bevy_cosmic_edit"]
## Macro ([`impl_haalka_methods!`](https://docs.rs/haalka/latest/haalka/macro.impl_haalka_methods.html)) for deriving convenience methods for modifying components on custom element structs with static values, functions, or signals.
derive = ["paste"]
## Utilities for working with async, [`futures_signals::Mutable`](https://docs.rs/futures-signals/0.3.34/futures_signals/signal/struct.Mutable.html)s and [`futures_signals::Signal`](https://docs.rs/futures-signals/latest/futures_signals/signal/trait.Signal.html)s.
utils = []
## Compatibility feature threaded to [bevy_cosmic_edit](https://github.com/Dimchikkk/bevy_cosmic_edit/blob/776605d549540d0b40edccc1eabe431f617875a0/Cargo.toml#L14) to handle multiple cameras, see [considerations](#considerations).
multicam = ["bevy_cosmic_edit?/multicam"]
## `DebugUiPlugin` which enables toggling [`bevy_dev_tools::ui_debug_overlay::DebugUiPlugin`](https://docs.rs/bevy/latest/bevy/dev_tools/ui_debug_overlay/struct.DebugUiPlugin.html) with the `F1` key; requires a camera to be marked with the [`IsDefaultCamera`](https://docs.rs/bevy/latest/bevy/prelude/struct.IsDefaultUiCamera.html#) component.
debug = ["ui", "bevy_dev_tools", "multicam"]
## Pass-through for optionally enabling webgpu for examples.
webgpu = [
"bevy_render?/webgpu",
"bevy_core_pipeline?/webgpu",
"bevy_pbr?/webgpu",
"bevy_gizmos?/webgpu",
"bevy_sprite?/webgpu",
"bevy_cosmic_edit?/webgpu",
]
deployed_wasm_example = []
[dev-dependencies]
bevy = "0.14"
bevy_asset_loader = { version = "0.21", features = ["2d"] }
bevy_nine_slice_ui = "0.7"
bevy_rand = { version = "0.7", features = ["rand_chacha"] }
colorgrad = "0.6"
rand = "0.8"
strum = { version = "0.25", features = ["derive"] }
calc = { version = "0.4", default-features = false }
rust_decimal = "1.35"
[package.metadata.cargo-all-features]
allowlist = [
"text_input",
"ui",
"derive",
"utils",
"multicam",
"debug",
]
[[example]]
name = "align"
path = "examples/align.rs"
doc-scrape-examples = true
# TODO: relying on the features here for `cargo run --example ...` enables moving the
# examples/utils.rs to src/utils.rs behind a feature flag; this already works for building docs
# requires https://github.com/rust-lang/cargo/issues/4663#issue-268904412
# required-features = ["examples", "debug"]
[[example]]
name = "button"
path = "examples/button.rs"
doc-scrape-examples = true
[[example]]
name = "calculator"
path = "examples/calculator.rs"
doc-scrape-examples = true
[[example]]
name = "main_menu"
path = "examples/main_menu.rs"
doc-scrape-examples = true
[[example]]
name = "inventory"
path = "examples/inventory.rs"
doc-scrape-examples = true
[[example]]
name = "healthbar"
path = "examples/healthbar.rs"
doc-scrape-examples = true
[[example]]
name = "responsive_menu"
path = "examples/responsive_menu.rs"
doc-scrape-examples = true
[[example]]
name = "character_editor"
path = "examples/character_editor.rs"
doc-scrape-examples = true
[[example]]
name = "counter"
path = "examples/counter.rs"
doc-scrape-examples = true
[[example]]
name = "ecs_ui_sync"
path = "examples/ecs_ui_sync.rs"
doc-scrape-examples = true
[[example]]
name = "key_values_sorted"
path = "examples/key_values_sorted.rs"
doc-scrape-examples = true
[[example]]
name = "scroll_grid"
path = "examples/scroll_grid.rs"
doc-scrape-examples = true
[[example]]
name = "scroll"
path = "examples/scroll.rs"
doc-scrape-examples = true
[[example]]
name = "snake"
path = "examples/snake.rs"
doc-scrape-examples = true