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 = { version = "0.13.2", 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 = { version = "0.8.0", features = ["wayland", "x11"], optional = true }
194xim = { git = "https://github.com/XDeme1/xim-rs", rev = "d50d461764c2213655cd9cf65a0ea94c70d3c4fd", features = [
195    "x11rb-xcb",
196    "x11rb-client",
197], optional = true }
198x11-clipboard = { version = "0.9.3", optional = true }
199
200[target.'cfg(windows)'.dependencies]
201blade-util.workspace = true
202bytemuck = "1"
203blade-graphics.workspace = true
204blade-macros.workspace = true
205flume = "0.11"
206rand.workspace = true
207windows.workspace = true
208windows-core = "0.61"
209windows-numerics = "0.2"
210
211[dev-dependencies]
212backtrace = "0.3"
213collections = { workspace = true, features = ["test-support"] }
214env_logger.workspace = true
215http_client = { workspace = true, features = ["test-support"] }
216lyon = { version = "1.0", features = ["extra"] }
217rand.workspace = true
218unicode-segmentation.workspace = true
219reqwest_client = { workspace = true, features = ["test-support"] }
220util = { workspace = true, features = ["test-support"] }
221
222[target.'cfg(target_os = "windows")'.build-dependencies]
223embed-resource = "3.0"
224naga.workspace = true
225
226[target.'cfg(target_os = "macos")'.build-dependencies]
227bindgen = "0.70.0"
228cbindgen = { version = "0.28.0", default-features = false }
229naga.workspace = true
230
231[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.build-dependencies]
232naga.workspace = true
233
234
235[[example]]
236name = "hello_world"
237path = "examples/hello_world.rs"
238
239[[example]]
240name = "image"
241path = "examples/image/image.rs"
242
243[[example]]
244name = "input"
245path = "examples/input.rs"
246
247[[example]]
248name = "opacity"
249path = "examples/opacity.rs"
250
251[[example]]
252name = "pattern"
253path = "examples/pattern.rs"
254
255[[example]]
256name = "set_menus"
257path = "examples/set_menus.rs"
258
259[[example]]
260name = "shadow"
261path = "examples/shadow.rs"
262
263[[example]]
264name = "svg"
265path = "examples/svg/svg.rs"
266
267[[example]]
268name = "text_wrapper"
269path = "examples/text_wrapper.rs"
270
271[[example]]
272name = "uniform_list"
273path = "examples/uniform_list.rs"
274
275[[example]]
276name = "window_shadow"
277path = "examples/window_shadow.rs"
278
279[[example]]
280name = "on_window_close_quit"
281path = "examples/on_window_close_quit.rs"