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