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