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 = ["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    "filedescriptor",
 51    "xkbcommon",
 52    "open",
 53]
 54x11 = [
 55    "blade-graphics",
 56    "blade-macros",
 57    "blade-util",
 58    "bytemuck",
 59    "ashpd",
 60    "cosmic-text",
 61    "font-kit",
 62    "as-raw-xcb-connection",
 63    "x11rb",
 64    "xkbcommon",
 65    "xim",
 66    "x11-clipboard",
 67    "filedescriptor",
 68    "open",
 69    "scap?/x11",
 70]
 71screen-capture = [
 72    "scap",
 73]
 74windows-manifest = []
 75profile-with-tracy = ["dep:tracy-client"]
 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.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 }
114util_macros.workspace = true
115schemars.workspace = true
116seahash = "4.1"
117semantic_version.workspace = true
118serde.workspace = true
119serde_json.workspace = true
120slotmap.workspace = true
121smallvec.workspace = true
122smol.workspace = true
123stacksafe.workspace = true
124strum.workspace = true
125sum_tree.workspace = true
126taffy = "=0.9.0"
127thiserror.workspace = true
128tracy-client = { workspace = true, optional = true }
129util.workspace = true
130uuid.workspace = true
131waker-fn = "1.2.0"
132lyon = "1.0"
133workspace-hack.workspace = true
134libc.workspace = true
135
136[target.'cfg(target_os = "macos")'.dependencies]
137block = "0.1"
138cocoa.workspace = true
139core-foundation.workspace = true
140core-foundation-sys.workspace = true
141core-graphics = "0.24"
142core-video.workspace = true
143core-text = "21"
144font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "5474cfad4b719a72ec8ed2cb7327b2b01fd10568", optional = true }
145foreign-types = "0.5"
146log.workspace = true
147media.workspace = true
148objc.workspace = true
149objc2 = { version = "0.6", optional = true }
150objc2-metal = { version = "0.3", optional = true }
151#TODO: replace with "objc2"
152metal.workspace = true
153
154[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))'.dependencies]
155pathfinder_geometry = "0.5"
156
157[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "windows"))'.dependencies]
158scap = { workspace = true, optional = true }
159
160[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
161# Always used
162flume = "0.11"
163oo7 = { version = "0.5.0", default-features = false, features = [
164    "async-std",
165    "native_crypto",
166] }
167
168# Used in both windowing options
169ashpd = { workspace = true, optional = true }
170blade-graphics = { workspace = true, optional = true }
171blade-macros = { workspace = true, optional = true }
172blade-util = { workspace = true, optional = true }
173bytemuck = { version = "1", optional = true }
174cosmic-text = { version = "0.14.0", optional = true }
175font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "5474cfad4b719a72ec8ed2cb7327b2b01fd10568", features = [
176    "source-fontconfig-dlopen",
177], optional = true }
178
179calloop = { version = "0.13.0" }
180filedescriptor = { version = "0.8.2", optional = true }
181open = { version = "5.2.0", optional = true }
182
183# Wayland
184calloop-wayland-source = { version = "0.3.0", optional = true }
185wayland-backend = { version = "0.3.3", features = [
186    "client_system",
187    "dlopen",
188], optional = true }
189wayland-client = { version = "0.31.2", optional = true }
190wayland-cursor = { version = "0.31.1", optional = true }
191wayland-protocols = { version = "0.31.2", features = [
192    "client",
193    "staging",
194    "unstable",
195], optional = true }
196wayland-protocols-plasma = { version = "0.2.0", features = [
197    "client",
198], optional = true }
199
200# X11
201as-raw-xcb-connection = { version = "1", optional = true }
202x11rb = { version = "0.13.1", features = [
203    "allow-unsafe-code",
204    "xkb",
205    "randr",
206    "xinput",
207    "cursor",
208    "resource_manager",
209    "sync",
210], optional = true }
211xkbcommon = { version = "0.8.0", features = [
212    "wayland",
213    "x11",
214], optional = true }
215xim = { git = "https://github.com/zed-industries/xim-rs", rev = "c0a70c1bd2ce197364216e5e818a2cb3adb99a8d" , features = [
216    "x11rb-xcb",
217    "x11rb-client",
218], optional = true }
219x11-clipboard = { version = "0.9.3", optional = true }
220
221[target.'cfg(target_os = "windows")'.dependencies]
222flume = "0.11"
223rand.workspace = true
224windows.workspace = true
225windows-core.workspace = true
226windows-numerics = "0.2"
227windows-registry = "0.5"
228
229[dev-dependencies]
230backtrace = "0.3"
231collections = { workspace = true, features = ["test-support"] }
232env_logger.workspace = true
233http_client = { workspace = true, features = ["test-support"] }
234lyon = { version = "1.0", features = ["extra"] }
235pretty_assertions.workspace = true
236rand.workspace = true
237reqwest_client = { workspace = true, features = ["test-support"] }
238unicode-segmentation.workspace = true
239util = { workspace = true, features = ["test-support"] }
240
241[target.'cfg(target_os = "windows")'.build-dependencies]
242embed-resource = "3.0"
243
244[target.'cfg(target_os = "macos")'.build-dependencies]
245bindgen = "0.71"
246cbindgen = { version = "0.28.0", default-features = false }
247naga.workspace = true
248
249[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.build-dependencies]
250naga.workspace = true
251
252
253[[example]]
254name = "hello_world"
255path = "examples/hello_world.rs"
256
257[[example]]
258name = "image"
259path = "examples/image/image.rs"
260
261[[example]]
262name = "input"
263path = "examples/input.rs"
264
265[[example]]
266name = "on_window_close_quit"
267path = "examples/on_window_close_quit.rs"
268
269[[example]]
270name = "opacity"
271path = "examples/opacity.rs"
272
273[[example]]
274name = "pattern"
275path = "examples/pattern.rs"
276
277[[example]]
278name = "set_menus"
279path = "examples/set_menus.rs"
280
281[[example]]
282name = "shadow"
283path = "examples/shadow.rs"
284
285[[example]]
286name = "svg"
287path = "examples/svg/svg.rs"
288
289[[example]]
290name = "tab_stop"
291path = "examples/tab_stop.rs"
292
293[[example]]
294name = "text"
295path = "examples/text.rs"
296
297[[example]]
298name = "text_wrapper"
299path = "examples/text_wrapper.rs"
300
301[[example]]
302name = "tree"
303path = "examples/tree.rs"
304
305[[example]]
306name = "uniform_list"
307path = "examples/uniform_list.rs"
308
309[[example]]
310name = "window_shadow"
311path = "examples/window_shadow.rs"
312
313[[example]]
314name = "grid_layout"
315path = "examples/grid_layout.rs"