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