-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathCargo.toml
More file actions
182 lines (145 loc) · 5.51 KB
/
Cargo.toml
File metadata and controls
182 lines (145 loc) · 5.51 KB
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
[workspace.package]
authors = ["Diggory Hardy <git@dhardy.name>"]
edition = "2024"
license = "Apache-2.0"
repository = "https://github.com/kas-gui/kas"
rust-version = "1.92.0"
[package]
name = "kas"
version = "0.17.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
description = "A pure-Rust GUI toolkit with stateful widgets"
readme = "README.md"
documentation = "https://docs.rs/kas/"
keywords = ["gui"]
categories = ["gui"]
repository.workspace = true
exclude = ["/examples"]
rust-version.workspace = true
[package.metadata.docs.rs]
features = ["stable"]
rustdoc-args = ["--cfg", "docsrs"]
# To build locally:
# RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --features=stable,internal_doc,wayland --workspace --no-deps --open
[features]
######### meta / build features #########
# Basic support for common platforms (uses kas-soft)
minimal = ["wayland", "soft"]
# Recommended minimal feature set (uses kas-wgpu)
default = ["wayland", "vulkan", "dx12", "metal", "clipboard", "shaping"]
# All standard test target features
stable = ["default", "view", "image-default-formats", "canvas", "svg", "markdown", "spawn", "x11", "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 = ["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"]
# Enables all proc-macro diagnostics, including pedantic warnings; nightly only.
nightly-diagnostics-pedantic = ["nightly-diagnostics", "kas-core/nightly-diagnostics-pedantic"]
# Use full specialization
spec = ["kas-core/spec"]
# Enable view widgets
view = ["dep:kas-view", "kas-dylib?/view"]
# Enable WGPU backend:
wgpu = ["dep:kas-wgpu", "kas-dylib?/wgpu"]
# WGPU backends
vulkan = ["wgpu", "kas-wgpu/vulkan"]
gles = ["wgpu", "kas-wgpu/gles"]
dx12 = ["wgpu", "kas-wgpu/dx12"]
metal = ["wgpu", "kas-wgpu/metal"]
# Enable software rendering backend:
soft = ["dep:kas-soft", "kas-dylib?/soft"]
# 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"]
# Enables clipboard read/write
clipboard = ["kas-core/clipboard"]
# Enable AccessKit integration
accesskit = ["kas-core/accesskit"]
# 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 raster image loading and decoding (does not imply any formats)
image = ["dep:kas-image", "kas-image/image", "kas-dylib?/image"]
# Enable all default formats of the image crate
image-default-formats = ["image", "kas-image/image-default-formats"]
# Selected image formats
avif = ["image", "kas-image/avif"]
jpeg = ["image", "kas-image/jpeg"]
png = ["image", "kas-image/png"]
webp = ["image", "kas-image/webp"]
# Enable Svg widget
svg = ["dep:kas-image", "kas-image/svg", "kas-dylib?/image"]
# Enable Canvas widget
canvas = ["dep:kas-image", "kas-image/canvas", "kas-dylib?/image"]
# Enable SyntectHighlighter
syntect = ["kas-widgets/syntect"]
# 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"]
# Support Wayland
wayland = ["kas-core/wayland", "kas-soft?/wayland"]
# Support X11
x11 = ["kas-core/x11", "kas-soft?/wayland"]
# Optimize Node using unsafe code
unsafe_node = ["kas-core/unsafe_node"]
[dependencies]
kas-core = { version = "0.17.0", path = "crates/kas-core" }
kas-dylib = { version = "0.17.0", path = "crates/kas-dylib", optional = true }
kas-widgets = { version = "0.17.0", path = "crates/kas-widgets" }
kas-view = { version = "0.17.0", path = "crates/kas-view", optional = true }
kas-image = { version = "0.17.0", path = "crates/kas-image", optional = true }
kas-soft = { version = "0.17.0", path = "crates/kas-soft", optional = true }
[dependencies.kas-wgpu]
version = "0.17.0"
path = "crates/kas-wgpu"
optional = true
default-features = false
[dev-dependencies]
kas = { path = ".", default-features = false, features = ["view", "markdown", "svg", "canvas", "syntect"] }
chrono = "0.4"
env_logger = "0.11"
log = "0.4"
[workspace]
members = [
"crates/kas-core",
"crates/kas-dylib",
"crates/kas-macros",
"crates/kas-image",
"crates/kas-soft",
"crates/kas-wgpu",
"crates/kas-widgets",
"crates/kas-view",
"examples/mandlebrot",
"examples/text-editor",
"examples/file-explorer",
]
resolver = "2"
[patch.crates-io.kas-text]
git = "https://github.com/kas-gui/kas-text.git"
rev = "9797e78ad4664ae5055e8dab6067e40b215f6b3e"
[patch.crates-io.impl-tools-lib]
git = "https://github.com/kas-gui/impl-tools.git"
rev = "e0b80cf7f2b868b1ace4ec06601a5ed4cf098686"