Cargo.toml

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