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