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"
141circular-buffer.workspace = true
142spin = "0.10.0"
143
144[target.'cfg(target_os = "macos")'.dependencies]
145block = "0.1"
146cocoa.workspace = true
147cocoa-foundation.workspace = true
148core-foundation.workspace = true
149core-foundation-sys.workspace = true
150core-graphics = "0.24"
151core-video.workspace = true
152core-text = "21"
153# WARNING: If you change this, you must also publish a new version of zed-font-kit to crates.io
154font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "110523127440aefb11ce0cf280ae7c5071337ec5", package = "zed-font-kit", version = "0.14.1-zed", optional = true }
155foreign-types = "0.5"
156log.workspace = true
157media.workspace = true
158objc.workspace = true
159objc2 = { version = "0.6", optional = true }
160objc2-metal = { version = "0.3", optional = true }
161#TODO: replace with "objc2"
162metal.workspace = true
163
164[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))'.dependencies]
165pathfinder_geometry = "0.5"
166
167[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "windows"))'.dependencies]
168scap = { workspace = true, optional = true }
169
170[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
171# Always used
172flume = "0.11"
173oo7 = { version = "0.5.0", default-features = false, features = [
174    "async-std",
175    "native_crypto",
176] }
177
178# Used in both windowing options
179ashpd = { workspace = true, optional = true }
180blade-graphics = { workspace = true, optional = true }
181blade-macros = { workspace = true, optional = true }
182blade-util = { workspace = true, optional = true }
183bytemuck = { version = "1", optional = true }
184cosmic-text = { version = "0.14.0", optional = true }
185# WARNING: If you change this, you must also publish a new version of zed-font-kit to crates.io
186font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "110523127440aefb11ce0cf280ae7c5071337ec5", package = "zed-font-kit", version = "0.14.1-zed", features = [
187    "source-fontconfig-dlopen",
188], optional = true }
189
190calloop = { version = "0.13.0" }
191filedescriptor = { version = "0.8.2", optional = true }
192open = { version = "5.2.0", optional = true }
193
194# Wayland
195calloop-wayland-source = { version = "0.3.0", optional = true }
196wayland-backend = { version = "0.3.3", features = [
197    "client_system",
198    "dlopen",
199], optional = true }
200wayland-client = { version = "0.31.2", optional = true }
201wayland-cursor = { version = "0.31.1", optional = true }
202wayland-protocols = { version = "0.31.2", features = [
203    "client",
204    "staging",
205    "unstable",
206], optional = true }
207wayland-protocols-plasma = { version = "0.2.0", features = [
208    "client",
209], optional = true }
210wayland-protocols-wlr = { version = "0.3.9", features = [
211    "client",
212], optional = true }
213
214# X11
215as-raw-xcb-connection = { version = "1", optional = true }
216x11rb = { version = "0.13.1", features = [
217    "allow-unsafe-code",
218    "xkb",
219    "randr",
220    "xinput",
221    "cursor",
222    "resource_manager",
223    "sync",
224], optional = true }
225xkbcommon = { version = "0.8.0", features = [
226    "wayland",
227    "x11",
228], optional = true }
229# WARNING: If you change this, you must also publish a new version of zed-xim to crates.io
230xim = { git = "https://github.com/zed-industries/xim-rs.git", rev = "16f35a2c881b815a2b6cdfd6687988e84f8447d8" , features = [
231    "x11rb-xcb",
232    "x11rb-client",
233], package = "zed-xim", version = "0.4.0-zed", optional = true }
234x11-clipboard = { version = "0.9.3", optional = true }
235
236[target.'cfg(target_os = "windows")'.dependencies]
237flume = "0.11"
238rand.workspace = true
239windows.workspace = true
240windows-core.workspace = true
241windows-numerics = "0.2"
242windows-registry = "0.5"
243
244[dev-dependencies]
245backtrace.workspace = true
246collections = { workspace = true, features = ["test-support"] }
247env_logger.workspace = true
248http_client = { workspace = true, features = ["test-support"] }
249lyon = { version = "1.0", features = ["extra"] }
250pretty_assertions.workspace = true
251rand.workspace = true
252reqwest_client = { workspace = true, features = ["test-support"] }
253unicode-segmentation.workspace = true
254util = { workspace = true, features = ["test-support"] }
255
256[target.'cfg(target_os = "windows")'.build-dependencies]
257embed-resource = "3.0"
258windows-registry = "0.5"
259
260[target.'cfg(target_os = "macos")'.build-dependencies]
261bindgen = "0.71"
262cbindgen = { version = "0.28.0", default-features = false }
263naga.workspace = true
264
265[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.build-dependencies]
266naga.workspace = true
267
268
269[[example]]
270name = "hello_world"
271path = "examples/hello_world.rs"
272
273[[example]]
274name = "image"
275path = "examples/image/image.rs"
276
277[[example]]
278name = "input"
279path = "examples/input.rs"
280
281[[example]]
282name = "on_window_close_quit"
283path = "examples/on_window_close_quit.rs"
284
285[[example]]
286name = "opacity"
287path = "examples/opacity.rs"
288
289[[example]]
290name = "pattern"
291path = "examples/pattern.rs"
292
293[[example]]
294name = "set_menus"
295path = "examples/set_menus.rs"
296
297[[example]]
298name = "shadow"
299path = "examples/shadow.rs"
300
301[[example]]
302name = "svg"
303path = "examples/svg/svg.rs"
304
305[[example]]
306name = "tab_stop"
307path = "examples/tab_stop.rs"
308
309[[example]]
310name = "text"
311path = "examples/text.rs"
312
313[[example]]
314name = "text_wrapper"
315path = "examples/text_wrapper.rs"
316
317[[example]]
318name = "tree"
319path = "examples/tree.rs"
320
321[[example]]
322name = "uniform_list"
323path = "examples/uniform_list.rs"
324
325[[example]]
326name = "window_shadow"
327path = "examples/window_shadow.rs"
328
329[[example]]
330name = "grid_layout"
331path = "examples/grid_layout.rs"