Cargo.toml

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