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
129
130[target.'cfg(target_os = "macos")'.dependencies]
131block = "0.1"
132cocoa.workspace = true
133core-foundation.workspace = true
134core-foundation-sys.workspace = true
135core-graphics = "0.24"
136core-video.workspace = true
137core-text = "21"
138font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "5474cfad4b719a72ec8ed2cb7327b2b01fd10568", optional = true }
139foreign-types = "0.5"
140log.workspace = true
141media.workspace = true
142objc.workspace = true
143objc2 = { version = "0.6", optional = true }
144objc2-metal = { version = "0.3", optional = true }
145#TODO: replace with "objc2"
146metal.workspace = true
147
148[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))'.dependencies]
149pathfinder_geometry = "0.5"
150
151[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
152# Always used
153flume = "0.11"
154oo7 = { version = "0.4.0", default-features = false, features = [
155    "async-std",
156    "native_crypto",
157] }
158
159# Used in both windowing options
160ashpd = { workspace = true, optional = true }
161blade-graphics = { workspace = true, optional = true }
162blade-macros = { workspace = true, optional = true }
163blade-util = { workspace = true, optional = true }
164bytemuck = { version = "1", optional = true }
165cosmic-text = { version = "0.14.0", optional = true }
166font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "5474cfad4b719a72ec8ed2cb7327b2b01fd10568", features = [
167    "source-fontconfig-dlopen",
168], optional = true }
169scap = { workspace = true, optional = true }
170
171calloop = { version = "0.13.0" }
172filedescriptor = { version = "0.8.2", optional = true }
173open = { version = "5.2.0", optional = true }
174
175# Wayland
176calloop-wayland-source = { version = "0.3.0", optional = true }
177wayland-backend = { version = "0.3.3", features = [
178    "client_system",
179    "dlopen",
180], optional = true }
181wayland-client = { version = "0.31.2", optional = true }
182wayland-cursor = { version = "0.31.1", optional = true }
183wayland-protocols = { version = "0.31.2", features = [
184    "client",
185    "staging",
186    "unstable",
187], optional = true }
188wayland-protocols-plasma = { version = "0.2.0", features = [
189    "client",
190], optional = true }
191
192# X11
193as-raw-xcb-connection = { version = "1", optional = true }
194x11rb = { version = "0.13.1", features = [
195    "allow-unsafe-code",
196    "xkb",
197    "randr",
198    "xinput",
199    "cursor",
200    "resource_manager",
201    "sync",
202], optional = true }
203xkbcommon = { version = "0.8.0", features = [
204    "wayland",
205    "x11",
206], optional = true }
207xim = { git = "https://github.com/XDeme1/xim-rs", rev = "d50d461764c2213655cd9cf65a0ea94c70d3c4fd", features = [
208    "x11rb-xcb",
209    "x11rb-client",
210], optional = true }
211x11-clipboard = { version = "0.9.3", optional = true }
212
213[target.'cfg(target_os = "windows")'.dependencies]
214blade-util.workspace = true
215bytemuck = "1"
216blade-graphics.workspace = true
217blade-macros.workspace = true
218flume = "0.11"
219rand.workspace = true
220windows.workspace = true
221windows-core = "0.61"
222windows-numerics = "0.2"
223windows-registry = "0.5"
224
225[dev-dependencies]
226backtrace = "0.3"
227collections = { workspace = true, features = ["test-support"] }
228env_logger.workspace = true
229http_client = { workspace = true, features = ["test-support"] }
230lyon = { version = "1.0", features = ["extra"] }
231rand.workspace = true
232unicode-segmentation.workspace = true
233reqwest_client = { workspace = true, features = ["test-support"] }
234util = { workspace = true, features = ["test-support"] }
235
236[target.'cfg(target_os = "windows")'.build-dependencies]
237embed-resource = "3.0"
238naga.workspace = true
239
240[target.'cfg(target_os = "macos")'.build-dependencies]
241bindgen = "0.71"
242cbindgen = { version = "0.28.0", default-features = false }
243naga.workspace = true
244
245[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.build-dependencies]
246naga.workspace = true
247
248
249[[example]]
250name = "hello_world"
251path = "examples/hello_world.rs"
252
253[[example]]
254name = "image"
255path = "examples/image/image.rs"
256
257[[example]]
258name = "input"
259path = "examples/input.rs"
260
261[[example]]
262name = "on_window_close_quit"
263path = "examples/on_window_close_quit.rs"
264
265[[example]]
266name = "opacity"
267path = "examples/opacity.rs"
268
269[[example]]
270name = "pattern"
271path = "examples/pattern.rs"
272
273[[example]]
274name = "set_menus"
275path = "examples/set_menus.rs"
276
277[[example]]
278name = "shadow"
279path = "examples/shadow.rs"
280
281[[example]]
282name = "svg"
283path = "examples/svg/svg.rs"
284
285[[example]]
286name = "text"
287path = "examples/text.rs"
288
289[[example]]
290name = "text_wrapper"
291path = "examples/text_wrapper.rs"
292
293[[example]]
294name = "uniform_list"
295path = "examples/uniform_list.rs"
296
297[[example]]
298name = "window_shadow"
299path = "examples/window_shadow.rs"