-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Cargo.toml
164 lines (131 loc) · 5.02 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
[package]
name = "kas"
version = "0.15.0"
authors = ["Diggory Hardy <git@dhardy.name>"]
edition = "2021"
license = "Apache-2.0"
description = "A pure-Rust GUI toolkit with stateful widgets"
readme = "README.md"
documentation = "https://docs.rs/kas/"
keywords = ["gui"]
categories = ["gui"]
repository = "https://github.com/kas-gui/kas"
exclude = ["/examples"]
rust-version = "1.80.0"
[package.metadata.docs.rs]
features = ["stable"]
rustdoc-args = ["--cfg", "docsrs"]
# To build locally:
# RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --features=stable,internal_doc --all --no-deps --open
[features]
######### meta / build features #########
# The minimal feature set needed to build basic applications (with assumptions
# about target platforms).
#
# Note: only some examples build in this configuration; others need view,
# markdown, resvg. Recommended also: clipboard, ron (or some config format).
minimal = ["wgpu", "winit", "wayland"]
# All recommended features for optimal experience
default = ["minimal", "view", "image", "resvg", "clipboard", "markdown", "shaping", "spawn"]
# All standard test target features
stable = ["default", "x11", "serde", "toml", "yaml", "json", "ron", "macros_log"]
# Enables all "recommended" features for nightly rustc
nightly = ["stable", "nightly-diagnostics", "kas-core/nightly"]
# Additional, less recommendation-worthy features
experimental = ["dark-light", "recursive-layout-widgets", "unsafe_node"]
# Enable dynamic linking (faster linking via an extra run-time dependency):
dynamic = ["dep:kas-dylib"]
######### optional dependencies / features #########
# Enables better proc-macro diagnostics (including warnings); nightly only.
nightly-diagnostics = ["kas-core/nightly-diagnostics"]
# Use full specialization
spec = ["kas-core/spec"]
# Enable view widgets
view = ["dep:kas-view"]
#Enable WGPU backend:
wgpu = ["dep:kas-wgpu"]
# Enables documentation of APIs for graphics library and platform backends.
# This API is not intended for use by end-user applications and
# thus is omitted from built documentation by default.
# This flag does not change the API, only built documentation.
internal_doc = ["kas-core/internal_doc", "kas-wgpu?/internal_doc"]
# Enables clipboard read/write
clipboard = ["kas-core/clipboard"]
# Enable Markdown parsing
markdown = ["kas-core/markdown"]
# Enable text shaping
shaping = ["kas-core/shaping"]
# Enable serde support (mainly config read/write)
serde = ["kas-core/serde"]
# Enable support for YAML (de)serialisation
yaml = ["serde", "kas-core/yaml"]
# Enable support for JSON (de)serialisation
json = ["serde", "kas-core/json"]
# Enable support for RON (de)serialisation
ron = ["serde", "kas-core/ron"]
# Enable support for TOML (de)serialisation
toml = ["serde", "kas-core/toml"]
# Support image loading and decoding
image = ["kas-core/image", "kas-widgets/image"]
# Enable resvg module (Canvas + Svg widgets)
resvg = ["dep:kas-resvg", "kas-resvg?/svg", "kas-dylib?/resvg"]
# Enable resvg module (Canvas only)
tiny-skia = ["dep:kas-resvg"]
# Automatically detect usage of dark theme
#
# Not a default dependency; see https://github.com/emilk/egui/issues/2388
dark-light = ["kas-core/dark-light"]
# Support spawning async tasks
spawn = ["kas-core/spawn"]
# Support SVG images
# Inject logging into macro-generated code.
# Requires that all crates using these macros depend on the log crate.
macros_log = ["kas-core/macros_log"]
winit = ["kas-core/winit"]
# Support Wayland
wayland = ["kas-core/wayland"]
# Support X11
x11 = ["kas-core/x11"]
# Optimize generated layout widgets
#
# Recursive layout macros allow the generation of complex layout widgets; for
# example `row!["a", column!["b", "c"]]` yields a single layout widget (over
# three `StrLabel` widgets) instead of two separate layout widgets.
# (Note that this happens anyway in custom widget layout syntax where it is
# requried to support reference to widget fields.)
#
# A limited number of method calls such as `.align(AlignHints::LEFT)` and
# `.map_any()` are supported but are not linked correctly via rust-analyzer.
#
# Often results in unused import warnings, hence you may want to use
# RUSTFLAGS="-A unused_imports".
recursive-layout-widgets = ["kas-core/recursive-layout-widgets"]
# Optimize Node using unsafe code
unsafe_node = ["kas-core/unsafe_node"]
[dependencies]
kas-core = { version = "0.15.0", path = "crates/kas-core" }
kas-dylib = { version = "0.15.0", path = "crates/kas-dylib", optional = true }
kas-widgets = { version = "0.15.0", path = "crates/kas-widgets" }
kas-view = { version = "0.15.0", path = "crates/kas-view", optional = true }
kas-resvg = { version = "0.15.0", path = "crates/kas-resvg", optional = true }
[dependencies.kas-wgpu]
version = "0.15.0"
path = "crates/kas-wgpu"
optional = true
default-features = false
features = ["raster"]
[dev-dependencies]
chrono = "0.4"
env_logger = "0.11"
log = "0.4"
[workspace]
members = [
"crates/kas-core",
"crates/kas-dylib",
"crates/kas-macros",
"crates/kas-resvg",
"crates/kas-wgpu",
"crates/kas-widgets",
"crates/kas-view",
"examples/mandlebrot",
]