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    "rand_chacha",
 26    "util/test-support",
 27    "http_client/test-support",
 28    "wayland",
 29    "x11",
 30]
 31inspector = ["gpui_macros/inspector"]
 32leak-detection = ["backtrace"]
 33runtime_shaders = []
 34macos-blade = [
 35    "blade-graphics",
 36    "blade-macros",
 37    "blade-util",
 38    "bytemuck",
 39    "objc2",
 40    "objc2-metal",
 41]
 42wayland = [
 43    "bitflags",
 44    "blade-graphics",
 45    "blade-macros",
 46    "blade-util",
 47    "bytemuck",
 48    "ashpd/wayland",
 49    "cosmic-text",
 50    "font-kit",
 51    "calloop-wayland-source",
 52    "wayland-backend",
 53    "wayland-client",
 54    "wayland-cursor",
 55    "wayland-protocols",
 56    "wayland-protocols-plasma",
 57    "wayland-protocols-wlr",
 58    "filedescriptor",
 59    "xkbcommon",
 60    "open",
 61]
 62x11 = [
 63    "blade-graphics",
 64    "blade-macros",
 65    "blade-util",
 66    "bytemuck",
 67    "ashpd",
 68    "cosmic-text",
 69    "font-kit",
 70    "as-raw-xcb-connection",
 71    "x11rb",
 72    "xkbcommon",
 73    "xim",
 74    "x11-clipboard",
 75    "filedescriptor",
 76    "open",
 77    "scap?/x11",
 78]
 79screen-capture = [
 80    "scap",
 81]
 82windows-manifest = []
 83
 84[lib]
 85path = "src/gpui.rs"
 86doctest = false
 87
 88[dependencies]
 89anyhow.workspace = true
 90async-task = "4.7"
 91backtrace = { workspace = true, optional = true }
 92bitflags = { workspace = true, optional = true }
 93blade-graphics = { workspace = true, optional = true }
 94blade-macros = { workspace = true, optional = true }
 95blade-util = { workspace = true, optional = true }
 96bytemuck = { version = "1", optional = true }
 97collections.workspace = true
 98ctor.workspace = true
 99derive_more.workspace = true
100etagere = "0.2"
101futures.workspace = true
102gpui_macros.workspace = true
103http_client.workspace = true
104image.workspace = true
105inventory.workspace = true
106itertools.workspace = true
107log.workspace = true
108num_cpus = "1.13"
109parking = "2.0.0"
110parking_lot.workspace = true
111postage.workspace = true
112profiling.workspace = true
113rand = { optional = true, workspace = true }
114rand_chacha = { optional = true, workspace = true }
115raw-window-handle = "0.6"
116refineable.workspace = true
117resvg = { version = "0.45.0", default-features = false, features = [
118    "text",
119    "system-fonts",
120    "memmap-fonts",
121] }
122usvg = { version = "0.45.0", default-features = false }
123util_macros.workspace = true
124schemars.workspace = true
125seahash = "4.1"
126semantic_version.workspace = true
127serde.workspace = true
128serde_json.workspace = true
129slotmap.workspace = true
130smallvec.workspace = true
131smol.workspace = true
132stacksafe.workspace = true
133strum.workspace = true
134sum_tree.workspace = true
135taffy = "=0.9.0"
136thiserror.workspace = true
137util.workspace = true
138uuid.workspace = true
139waker-fn = "1.2.0"
140lyon = "1.0"
141libc.workspace = true
142pin-project = "1.1.10"
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
252rand_chacha.workspace = true
253reqwest_client = { workspace = true, features = ["test-support"] }
254unicode-segmentation.workspace = true
255util = { workspace = true, features = ["test-support"] }
256
257[target.'cfg(target_os = "windows")'.build-dependencies]
258embed-resource = "3.0"
259windows-registry = "0.5"
260
261[target.'cfg(target_os = "macos")'.build-dependencies]
262bindgen = "0.71"
263cbindgen = { version = "0.28.0", default-features = false }
264naga.workspace = true
265
266[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.build-dependencies]
267naga.workspace = true
268
269
270[[example]]
271name = "hello_world"
272path = "examples/hello_world.rs"
273
274[[example]]
275name = "image"
276path = "examples/image/image.rs"
277
278[[example]]
279name = "input"
280path = "examples/input.rs"
281
282[[example]]
283name = "on_window_close_quit"
284path = "examples/on_window_close_quit.rs"
285
286[[example]]
287name = "opacity"
288path = "examples/opacity.rs"
289
290[[example]]
291name = "pattern"
292path = "examples/pattern.rs"
293
294[[example]]
295name = "set_menus"
296path = "examples/set_menus.rs"
297
298[[example]]
299name = "shadow"
300path = "examples/shadow.rs"
301
302[[example]]
303name = "svg"
304path = "examples/svg/svg.rs"
305
306[[example]]
307name = "tab_stop"
308path = "examples/tab_stop.rs"
309
310[[example]]
311name = "text"
312path = "examples/text.rs"
313
314[[example]]
315name = "text_wrapper"
316path = "examples/text_wrapper.rs"
317
318[[example]]
319name = "tree"
320path = "examples/tree.rs"
321
322[[example]]
323name = "uniform_list"
324path = "examples/uniform_list.rs"
325
326[[example]]
327name = "window_shadow"
328path = "examples/window_shadow.rs"
329
330[[example]]
331name = "grid_layout"
332path = "examples/grid_layout.rs"