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    "rand",
 25    "util/test-support",
 26    "http_client/test-support",
 27    "wayland",
 28    "x11",
 29]
 30inspector = ["gpui_macros/inspector"]
 31leak-detection = ["backtrace"]
 32runtime_shaders = []
 33macos-blade = [
 34    "blade-graphics",
 35    "blade-macros",
 36    "blade-util",
 37    "bytemuck",
 38    "objc2",
 39    "objc2-metal",
 40]
 41wayland = [
 42    "blade-graphics",
 43    "blade-macros",
 44    "blade-util",
 45    "bytemuck",
 46    "ashpd/wayland",
 47    "cosmic-text",
 48    "font-kit",
 49    "calloop-wayland-source",
 50    "wayland-backend",
 51    "wayland-client",
 52    "wayland-cursor",
 53    "wayland-protocols",
 54    "wayland-protocols-plasma",
 55    "filedescriptor",
 56    "xkbcommon",
 57    "open",
 58]
 59x11 = [
 60    "blade-graphics",
 61    "blade-macros",
 62    "blade-util",
 63    "bytemuck",
 64    "ashpd",
 65    "cosmic-text",
 66    "font-kit",
 67    "as-raw-xcb-connection",
 68    "x11rb",
 69    "xkbcommon",
 70    "xim",
 71    "x11-clipboard",
 72    "filedescriptor",
 73    "open",
 74    "scap?/x11",
 75]
 76screen-capture = [
 77    "scap",
 78]
 79windows-manifest = []
 80
 81[lib]
 82path = "src/gpui.rs"
 83doctest = false
 84
 85[dependencies]
 86anyhow.workspace = true
 87async-task = "4.7"
 88backtrace = { version = "0.3", optional = true }
 89blade-graphics = { workspace = true, optional = true }
 90blade-macros = { workspace = true, optional = true }
 91blade-util = { workspace = true, optional = true }
 92bytemuck = { version = "1", optional = true }
 93collections.workspace = true
 94ctor.workspace = true
 95derive_more.workspace = true
 96etagere = "0.2"
 97futures.workspace = true
 98gpui_macros.workspace = true
 99http_client.workspace = true
100image.workspace = true
101inventory.workspace = true
102itertools.workspace = true
103log.workspace = true
104num_cpus = "1.13"
105parking = "2.0.0"
106parking_lot.workspace = true
107postage.workspace = true
108profiling.workspace = true
109rand = { optional = true, workspace = true }
110raw-window-handle = "0.6"
111refineable.workspace = true
112resvg = { version = "0.45.0", default-features = false, features = [
113    "text",
114    "system-fonts",
115    "memmap-fonts",
116] }
117usvg = { version = "0.45.0", default-features = false }
118util_macros.workspace = true
119schemars.workspace = true
120seahash = "4.1"
121semantic_version.workspace = true
122serde.workspace = true
123serde_json.workspace = true
124slotmap.workspace = true
125smallvec.workspace = true
126smol.workspace = true
127stacksafe.workspace = true
128strum.workspace = true
129sum_tree.workspace = true
130taffy = "=0.9.0"
131thiserror.workspace = true
132util.workspace = true
133uuid.workspace = true
134waker-fn = "1.2.0"
135lyon = "1.0"
136libc.workspace = true
137pin-project = "1.1.10"
138
139[target.'cfg(target_os = "macos")'.dependencies]
140block = "0.1"
141cocoa.workspace = true
142cocoa-foundation.workspace = true
143core-foundation.workspace = true
144core-foundation-sys.workspace = true
145core-graphics = "0.24"
146core-video.workspace = true
147core-text = "21"
148# WARNING: If you change this, you must also publish a new version of zed-font-kit to crates.io
149font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "110523127440aefb11ce0cf280ae7c5071337ec5", package = "zed-font-kit", version = "0.14.1-zed", optional = true }
150foreign-types = "0.5"
151log.workspace = true
152media.workspace = true
153objc.workspace = true
154objc2 = { version = "0.6", optional = true }
155objc2-metal = { version = "0.3", optional = true }
156#TODO: replace with "objc2"
157metal.workspace = true
158
159[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))'.dependencies]
160pathfinder_geometry = "0.5"
161
162[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "windows"))'.dependencies]
163scap = { workspace = true, optional = true }
164
165[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
166# Always used
167flume = "0.11"
168oo7 = { version = "0.5.0", default-features = false, features = [
169    "async-std",
170    "native_crypto",
171] }
172
173# Used in both windowing options
174ashpd = { workspace = true, optional = true }
175blade-graphics = { workspace = true, optional = true }
176blade-macros = { workspace = true, optional = true }
177blade-util = { workspace = true, optional = true }
178bytemuck = { version = "1", optional = true }
179cosmic-text = { version = "0.14.0", optional = true }
180# WARNING: If you change this, you must also publish a new version of zed-font-kit to crates.io
181font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "110523127440aefb11ce0cf280ae7c5071337ec5", package = "zed-font-kit", version = "0.14.1-zed", features = [
182    "source-fontconfig-dlopen",
183], optional = true }
184
185calloop = { version = "0.13.0" }
186filedescriptor = { version = "0.8.2", optional = true }
187open = { version = "5.2.0", optional = true }
188
189# Wayland
190calloop-wayland-source = { version = "0.3.0", optional = true }
191wayland-backend = { version = "0.3.3", features = [
192    "client_system",
193    "dlopen",
194], optional = true }
195wayland-client = { version = "0.31.2", optional = true }
196wayland-cursor = { version = "0.31.1", optional = true }
197wayland-protocols = { version = "0.31.2", features = [
198    "client",
199    "staging",
200    "unstable",
201], optional = true }
202wayland-protocols-plasma = { version = "0.2.0", features = [
203    "client",
204], optional = true }
205
206# X11
207as-raw-xcb-connection = { version = "1", optional = true }
208x11rb = { version = "0.13.1", features = [
209    "allow-unsafe-code",
210    "xkb",
211    "randr",
212    "xinput",
213    "cursor",
214    "resource_manager",
215    "sync",
216], optional = true }
217xkbcommon = { version = "0.8.0", features = [
218    "wayland",
219    "x11",
220], optional = true }
221# WARNING: If you change this, you must also publish a new version of zed-xim to crates.io
222xim = { git = "https://github.com/zed-industries/xim-rs.git", rev = "16f35a2c881b815a2b6cdfd6687988e84f8447d8" , features = [
223    "x11rb-xcb",
224    "x11rb-client",
225], package = "zed-xim", version = "0.4.0-zed", optional = true }
226x11-clipboard = { version = "0.9.3", optional = true }
227
228[target.'cfg(target_os = "windows")'.dependencies]
229flume = "0.11"
230rand.workspace = true
231windows.workspace = true
232windows-core.workspace = true
233windows-numerics = "0.2"
234windows-registry = "0.5"
235
236[dev-dependencies]
237backtrace = "0.3"
238collections = { workspace = true, features = ["test-support"] }
239env_logger.workspace = true
240http_client = { workspace = true, features = ["test-support"] }
241lyon = { version = "1.0", features = ["extra"] }
242pretty_assertions.workspace = true
243rand.workspace = true
244reqwest_client = { workspace = true, features = ["test-support"] }
245unicode-segmentation.workspace = true
246util = { workspace = true, features = ["test-support"] }
247
248[target.'cfg(target_os = "windows")'.build-dependencies]
249embed-resource = "3.0"
250
251[target.'cfg(target_os = "macos")'.build-dependencies]
252bindgen = "0.71"
253cbindgen = { version = "0.28.0", default-features = false }
254naga.workspace = true
255
256[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.build-dependencies]
257naga.workspace = true
258
259
260[[example]]
261name = "hello_world"
262path = "examples/hello_world.rs"
263
264[[example]]
265name = "image"
266path = "examples/image/image.rs"
267
268[[example]]
269name = "input"
270path = "examples/input.rs"
271
272[[example]]
273name = "on_window_close_quit"
274path = "examples/on_window_close_quit.rs"
275
276[[example]]
277name = "opacity"
278path = "examples/opacity.rs"
279
280[[example]]
281name = "pattern"
282path = "examples/pattern.rs"
283
284[[example]]
285name = "set_menus"
286path = "examples/set_menus.rs"
287
288[[example]]
289name = "shadow"
290path = "examples/shadow.rs"
291
292[[example]]
293name = "svg"
294path = "examples/svg/svg.rs"
295
296[[example]]
297name = "tab_stop"
298path = "examples/tab_stop.rs"
299
300[[example]]
301name = "text"
302path = "examples/text.rs"
303
304[[example]]
305name = "text_wrapper"
306path = "examples/text_wrapper.rs"
307
308[[example]]
309name = "tree"
310path = "examples/tree.rs"
311
312[[example]]
313name = "uniform_list"
314path = "examples/uniform_list.rs"
315
316[[example]]
317name = "window_shadow"
318path = "examples/window_shadow.rs"
319
320[[example]]
321name = "grid_layout"
322path = "examples/grid_layout.rs"