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 "http_client/test-support",
25 "wayland",
26 "x11",
27 "proptest",
28]
29inspector = ["gpui_macros/inspector"]
30leak-detection = ["backtrace"]
31wayland = [
32 "bitflags",
33]
34x11 = [
35 "scap?/x11",
36]
37screen-capture = [
38 "scap",
39]
40windows-manifest = ["dep:embed-resource"]
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
57futures-concurrency.workspace = true
58gpui_macros.workspace = true
59gpui_shared_string.workspace = true
60http_client.workspace = true
61image.workspace = true
62inventory.workspace = true
63itertools.workspace = true
64log.workspace = true
65num_cpus = "1.13"
66parking = "2.0.0"
67parking_lot.workspace = true
68postage.workspace = true
69proptest = { workspace = true, optional = true }
70chrono.workspace = true
71profiling.workspace = true
72rand.workspace = true
73raw-window-handle = "0.6"
74regex.workspace = true
75refineable.workspace = true
76scheduler.workspace = true
77resvg = { version = "0.45.0", default-features = false, features = [
78 "text",
79 "system-fonts",
80 "memmap-fonts",
81 "raster-images"
82] }
83usvg = { version = "0.45.0", default-features = false }
84ttf-parser = "0.25"
85util_macros.workspace = true
86schemars.workspace = true
87seahash = "4.1"
88serde.workspace = true
89serde_json.workspace = true
90slotmap.workspace = true
91smallvec.workspace = true
92async-channel.workspace = true
93stacksafe.workspace = true
94strum.workspace = true
95sum_tree.workspace = true
96taffy = "=0.9.0"
97thiserror.workspace = true
98gpui_util.workspace = true
99waker-fn = "1.2.0"
100lyon = "1.0"
101pin-project = "1.1.10"
102spin = "0.10.0"
103pollster.workspace = true
104url.workspace = true
105uuid.workspace = true
106web-time.workspace = true
107
108[target.'cfg(target_family = "wasm")'.dependencies]
109getrandom = { version = "0.3.4", features = ["wasm_js"] }
110uuid = { workspace = true, features = ["js"] }
111
112
113[target.'cfg(target_os = "macos")'.dependencies]
114block = "0.1"
115cocoa.workspace = true
116cocoa-foundation.workspace = true
117core-foundation.workspace = true
118core-foundation-sys.workspace = true
119core-graphics = "0.24"
120core-video.workspace = true
121core-text = "21"
122# WARNING: If you change this, you must also publish a new version of zed-font-kit to crates.io
123font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "110523127440aefb11ce0cf280ae7c5071337ec5", package = "zed-font-kit", version = "0.14.1-zed", optional = true }
124foreign-types = "0.5"
125log.workspace = true
126media.workspace = true
127objc.workspace = true
128objc2 = { version = "0.6", optional = true }
129objc2-metal = { version = "0.3", optional = true }
130mach2.workspace = true
131#TODO: replace with "objc2"
132metal.workspace = true
133
134[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))'.dependencies]
135pathfinder_geometry = "0.5"
136
137[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "windows"))'.dependencies]
138scap = { workspace = true, optional = true }
139
140
141
142[target.'cfg(target_os = "windows")'.dependencies]
143windows = { version = "0.61", features = ["Win32_Foundation"] }
144
145
146[dev-dependencies]
147backtrace.workspace = true
148collections = { workspace = true, features = ["test-support"] }
149env_logger.workspace = true
150gpui_platform = { workspace = true, features = ["font-kit"] }
151gpui_util = { workspace = true }
152lyon = { version = "1.0", features = ["extra"] }
153proptest = { workspace = true }
154rand.workspace = true
155scheduler = { workspace = true, features = ["test-support"] }
156unicode-segmentation = { workspace = true }
157
158[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
159http_client = { workspace = true, features = ["test-support"] }
160reqwest_client = { workspace = true, features = ["test-support"] }
161
162[target.'cfg(target_family = "wasm")'.dev-dependencies]
163wasm-bindgen = { workspace = true }
164gpui_web.workspace = true
165
166[build-dependencies]
167embed-resource = { version = "3.0", optional = true }
168
169[target.'cfg(target_os = "macos")'.build-dependencies]
170bindgen = "0.71"
171cbindgen = { version = "0.28.0", default-features = false }
172naga.workspace = true
173
174
175
176
177[[example]]
178name = "hello_world"
179path = "examples/hello_world.rs"
180
181[[example]]
182name = "image"
183path = "examples/image/image.rs"
184
185[[example]]
186name = "input"
187path = "examples/input.rs"
188
189[[example]]
190name = "on_window_close_quit"
191path = "examples/on_window_close_quit.rs"
192
193[[example]]
194name = "opacity"
195path = "examples/opacity.rs"
196
197[[example]]
198name = "pattern"
199path = "examples/pattern.rs"
200
201[[example]]
202name = "set_menus"
203path = "examples/set_menus.rs"
204
205[[example]]
206name = "shadow"
207path = "examples/shadow.rs"
208
209[[example]]
210name = "svg"
211path = "examples/svg/svg.rs"
212
213[[example]]
214name = "tab_stop"
215path = "examples/tab_stop.rs"
216
217[[example]]
218name = "text"
219path = "examples/text.rs"
220
221[[example]]
222name = "text_wrapper"
223path = "examples/text_wrapper.rs"
224
225[[example]]
226name = "tree"
227path = "examples/tree.rs"
228
229[[example]]
230name = "uniform_list"
231path = "examples/uniform_list.rs"
232
233[[example]]
234name = "window_shadow"
235path = "examples/window_shadow.rs"
236
237[[example]]
238name = "grid_layout"
239path = "examples/grid_layout.rs"
240
241[[example]]
242name = "list_example"
243path = "examples/list_example.rs"
244
245[[example]]
246name = "mouse_pressure"
247path = "examples/mouse_pressure.rs"