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 = []
 75
 76[lib]
 77path = "src/gpui.rs"
 78doctest = false
 79
 80[dependencies]
 81anyhow.workspace = true
 82async-task = "4.7"
 83backtrace = { version = "0.3", optional = true }
 84blade-graphics = { workspace = true, optional = true }
 85blade-macros = { workspace = true, optional = true }
 86blade-util = { workspace = true, optional = true }
 87bytemuck = { version = "1", optional = true }
 88chrono.workspace = 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 }
114scheduler.workspace = true
115schemars.workspace = true
116seahash = "4.1"
117semantic_version.workspace = true
118serde.workspace = true
119serde_derive.workspace = true
120serde_json.workspace = true
121slotmap = "1.0.6"
122smallvec.workspace = true
123smol.workspace = true
124stacksafe.workspace = true
125strum.workspace = true
126sum_tree.workspace = true
127taffy = "=0.9.0"
128thiserror.workspace = 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.4.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"] }
235rand.workspace = true
236unicode-segmentation.workspace = true
237reqwest_client = { workspace = true, features = ["test-support"] }
238util = { workspace = true, features = ["test-support"] }
239
240[target.'cfg(target_os = "windows")'.build-dependencies]
241embed-resource = "3.0"
242
243[target.'cfg(target_os = "macos")'.build-dependencies]
244bindgen = "0.71"
245cbindgen = { version = "0.28.0", default-features = false }
246naga.workspace = true
247
248[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.build-dependencies]
249naga.workspace = true
250
251
252[[example]]
253name = "hello_world"
254path = "examples/hello_world.rs"
255
256[[example]]
257name = "image"
258path = "examples/image/image.rs"
259
260[[example]]
261name = "input"
262path = "examples/input.rs"
263
264[[example]]
265name = "on_window_close_quit"
266path = "examples/on_window_close_quit.rs"
267
268[[example]]
269name = "opacity"
270path = "examples/opacity.rs"
271
272[[example]]
273name = "pattern"
274path = "examples/pattern.rs"
275
276[[example]]
277name = "set_menus"
278path = "examples/set_menus.rs"
279
280[[example]]
281name = "shadow"
282path = "examples/shadow.rs"
283
284[[example]]
285name = "svg"
286path = "examples/svg/svg.rs"
287
288[[example]]
289name = "tab_stop"
290path = "examples/tab_stop.rs"
291
292[[example]]
293name = "text"
294path = "examples/text.rs"
295
296[[example]]
297name = "text_wrapper"
298path = "examples/text_wrapper.rs"
299
300[[example]]
301name = "tree"
302path = "examples/tree.rs"
303
304[[example]]
305name = "uniform_list"
306path = "examples/uniform_list.rs"
307
308[[example]]
309name = "window_shadow"
310path = "examples/window_shadow.rs"
311
312[[example]]
313name = "grid_layout"
314path = "examples/grid_layout.rs"