1[package]
2name = "gpui"
3version = "0.2.2"
4edition.workspace = true
5authors = ["Nathan Sobo <nathan@zed.dev>"]
6description = "Zed's GPU-accelerated UI framework"
7repository = "https://github.com/zed-industries/zed"
8publish = true
9license = "Apache-2.0"
10homepage = "https://gpui.rs"
11readme = "README.md"
12keywords = ["desktop", "gui", "immediate"]
13categories = ["gui"]
14
15
16[lints]
17workspace = true
18
19[features]
20default = ["font-kit", "wayland", "x11", "windows-manifest"]
21test-support = [
22 "leak-detection",
23 "collections/test-support",
24 "util/test-support",
25 "http_client/test-support",
26 "wayland",
27 "x11",
28]
29inspector = ["gpui_macros/inspector"]
30leak-detection = ["backtrace"]
31wayland = [
32 "bitflags",
33]
34x11 = [
35 "scap?/x11",
36]
37screen-capture = [
38 "scap",
39]
40windows-manifest = []
41
42[lib]
43path = "src/gpui.rs"
44doctest = false
45
46[dependencies]
47anyhow.workspace = true
48async-task = "4.7"
49backtrace = { workspace = true, optional = true }
50bitflags = { workspace = true, optional = true }
51
52collections.workspace = true
53ctor.workspace = true
54derive_more.workspace = true
55etagere = "0.2"
56futures.workspace = true
57gpui_macros.workspace = true
58http_client.workspace = true
59image.workspace = true
60inventory.workspace = true
61itertools.workspace = true
62log.workspace = true
63num_cpus = "1.13"
64parking = "2.0.0"
65parking_lot.workspace = true
66postage.workspace = true
67chrono.workspace = true
68profiling.workspace = true
69rand.workspace = true
70raw-window-handle = "0.6"
71refineable.workspace = true
72scheduler.workspace = true
73resvg = { version = "0.45.0", default-features = false, features = [
74 "text",
75 "system-fonts",
76 "memmap-fonts",
77] }
78usvg = { version = "0.45.0", default-features = false }
79util_macros.workspace = true
80schemars.workspace = true
81seahash = "4.1"
82serde.workspace = true
83serde_json.workspace = true
84slotmap.workspace = true
85smallvec.workspace = true
86smol.workspace = true
87stacksafe.workspace = true
88strum.workspace = true
89sum_tree.workspace = true
90taffy = "=0.9.0"
91thiserror.workspace = true
92util.workspace = true
93uuid.workspace = true
94waker-fn = "1.2.0"
95lyon = "1.0"
96pin-project = "1.1.10"
97circular-buffer.workspace = true
98spin = "0.10.0"
99
100[target.'cfg(target_os = "macos")'.dependencies]
101block = "0.1"
102cocoa.workspace = true
103cocoa-foundation.workspace = true
104core-foundation.workspace = true
105core-foundation-sys.workspace = true
106core-graphics = "0.24"
107core-video.workspace = true
108core-text = "21"
109# WARNING: If you change this, you must also publish a new version of zed-font-kit to crates.io
110font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "110523127440aefb11ce0cf280ae7c5071337ec5", package = "zed-font-kit", version = "0.14.1-zed", optional = true }
111foreign-types = "0.5"
112log.workspace = true
113media.workspace = true
114objc.workspace = true
115objc2 = { version = "0.6", optional = true }
116objc2-metal = { version = "0.3", optional = true }
117mach2.workspace = true
118#TODO: replace with "objc2"
119metal.workspace = true
120
121[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))'.dependencies]
122pathfinder_geometry = "0.5"
123
124[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "windows"))'.dependencies]
125scap = { workspace = true, optional = true }
126
127
128
129[target.'cfg(target_os = "windows")'.dependencies]
130windows = { version = "0.61", features = ["Win32_Foundation"] }
131
132
133[dev-dependencies]
134backtrace.workspace = true
135collections = { workspace = true, features = ["test-support"] }
136env_logger.workspace = true
137gpui_platform.workspace = true
138http_client = { workspace = true, features = ["test-support"] }
139lyon = { version = "1.0", features = ["extra"] }
140pretty_assertions.workspace = true
141rand.workspace = true
142reqwest_client = { workspace = true, features = ["test-support"] }
143scheduler = { workspace = true, features = ["test-support"] }
144unicode-segmentation.workspace = true
145util = { workspace = true, features = ["test-support"] }
146
147
148
149[target.'cfg(target_os = "windows")'.build-dependencies]
150embed-resource = "3.0"
151
152[target.'cfg(target_os = "macos")'.build-dependencies]
153bindgen = "0.71"
154cbindgen = { version = "0.28.0", default-features = false }
155naga.workspace = true
156
157
158
159
160[[example]]
161name = "hello_world"
162path = "examples/hello_world.rs"
163
164[[example]]
165name = "image"
166path = "examples/image/image.rs"
167
168[[example]]
169name = "input"
170path = "examples/input.rs"
171
172[[example]]
173name = "on_window_close_quit"
174path = "examples/on_window_close_quit.rs"
175
176[[example]]
177name = "opacity"
178path = "examples/opacity.rs"
179
180[[example]]
181name = "pattern"
182path = "examples/pattern.rs"
183
184[[example]]
185name = "set_menus"
186path = "examples/set_menus.rs"
187
188[[example]]
189name = "shadow"
190path = "examples/shadow.rs"
191
192[[example]]
193name = "svg"
194path = "examples/svg/svg.rs"
195
196[[example]]
197name = "tab_stop"
198path = "examples/tab_stop.rs"
199
200[[example]]
201name = "text"
202path = "examples/text.rs"
203
204[[example]]
205name = "text_wrapper"
206path = "examples/text_wrapper.rs"
207
208[[example]]
209name = "tree"
210path = "examples/tree.rs"
211
212[[example]]
213name = "uniform_list"
214path = "examples/uniform_list.rs"
215
216[[example]]
217name = "window_shadow"
218path = "examples/window_shadow.rs"
219
220[[example]]
221name = "grid_layout"
222path = "examples/grid_layout.rs"
223
224[[example]]
225name = "mouse_pressure"
226path = "examples/mouse_pressure.rs"