Cargo.toml

  1[package]
  2name = "gpui"
  3version = "0.1.0"
  4edition = "2021"
  5authors = ["Nathan Sobo <nathan@zed.dev>"]
  6description = "Zed's GPU-accelerated UI framework"
  7publish = false
  8license = "Apache-2.0"
  9
 10[lints]
 11workspace = true
 12
 13[features]
 14default = ["http_client", "font-kit", "wayland", "x11"]
 15test-support = [
 16    "backtrace",
 17    "collections/test-support",
 18    "rand",
 19    "util/test-support",
 20    "http_client?/test-support",
 21    "wayland",
 22    "x11",
 23]
 24runtime_shaders = []
 25macos-blade = ["blade-graphics", "blade-macros", "blade-util", "bytemuck"]
 26wayland = [
 27    "blade-graphics",
 28    "blade-macros",
 29    "blade-util",
 30    "bytemuck",
 31    "ashpd",
 32    "cosmic-text",
 33    "font-kit",
 34    "calloop-wayland-source",
 35    "wayland-backend",
 36    "wayland-client",
 37    "wayland-cursor",
 38    "wayland-protocols",
 39    "wayland-protocols-plasma",
 40    "filedescriptor",
 41    "xkbcommon",
 42    "open",
 43]
 44x11 = [
 45    "blade-graphics",
 46    "blade-macros",
 47    "blade-util",
 48    "bytemuck",
 49    "ashpd",
 50    "cosmic-text",
 51    "font-kit",
 52    "as-raw-xcb-connection",
 53    "x11rb",
 54    "xkbcommon",
 55    "xim",
 56    "x11-clipboard",
 57    "filedescriptor",
 58    "open",
 59]
 60
 61
 62[lib]
 63path = "src/gpui.rs"
 64doctest = false
 65
 66[dependencies]
 67anyhow.workspace = true
 68async-task = "4.7"
 69backtrace = { version = "0.3", optional = true }
 70blade-graphics = { workspace = true, optional = true }
 71blade-macros = { workspace = true, optional = true }
 72blade-util = { workspace = true, optional = true }
 73bytemuck = { version = "1", optional = true }
 74collections.workspace = true
 75ctor.workspace = true
 76derive_more.workspace = true
 77etagere = "0.2"
 78futures.workspace = true
 79gpui_macros.workspace = true
 80http_client = { optional = true, workspace = true }
 81image = "0.25.1"
 82itertools.workspace = true
 83linkme = "0.3"
 84log.workspace = true
 85num_cpus = "1.13"
 86parking = "2.0.0"
 87parking_lot.workspace = true
 88postage.workspace = true
 89profiling.workspace = true
 90rand = { optional = true, workspace = true }
 91raw-window-handle = "0.6"
 92refineable.workspace = true
 93resvg = { version = "0.44.0", default-features = false }
 94usvg = { version = "0.44.0", default-features = false }
 95schemars.workspace = true
 96seahash = "4.1"
 97semantic_version.workspace = true
 98serde.workspace = true
 99serde_derive.workspace = true
100serde_json.workspace = true
101slotmap = "1.0.6"
102smallvec.workspace = true
103smol.workspace = true
104strum.workspace = true
105sum_tree.workspace = true
106taffy = "0.4.3"
107thiserror.workspace = true
108util.workspace = true
109uuid.workspace = true
110waker-fn = "1.2.0"
111
112[dev-dependencies]
113backtrace = "0.3"
114collections = { workspace = true, features = ["test-support"] }
115env_logger.workspace = true
116rand.workspace = true
117util = { workspace = true, features = ["test-support"] }
118http_client = { workspace = true, features = ["test-support"] }
119unicode-segmentation.workspace = true
120
121[build-dependencies]
122embed-resource = "3.0"
123
124[target.'cfg(target_os = "macos")'.build-dependencies]
125bindgen = "0.70.0"
126cbindgen = { version = "0.27.0", default-features = false }
127
128[target.'cfg(target_os = "macos")'.dependencies]
129block = "0.1"
130cocoa.workspace = true
131core-foundation.workspace = true
132core-foundation-sys = "0.8"
133core-graphics = "0.23"
134core-text = "20.1"
135font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "40391b7", optional = true}
136foreign-types = "0.5"
137log.workspace = true
138media.workspace = true
139metal = "0.29"
140objc = "0.2"
141
142[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))'.dependencies]
143pathfinder_geometry = "0.5"
144
145[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
146# Always used
147flume = "0.11"
148oo7 = "0.3.0"
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 = { git = "https://github.com/pop-os/cosmic-text", rev = "542b20c", 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 = { git = "https://github.com/ConradIrwin/xkbcommon-rs", rev = "fcbb4612185cc129ceeff51d22f7fb51810a03b2", features = [
194    "wayland",
195    "x11",
196], optional = true }
197xim = { git = "https://github.com/XDeme1/xim-rs", rev = "d50d461764c2213655cd9cf65a0ea94c70d3c4fd", features = [
198    "x11rb-xcb",
199    "x11rb-client",
200], optional = true }
201x11-clipboard = { version = "0.9.3", optional = true }
202
203[target.'cfg(windows)'.dependencies]
204blade-util.workspace = true
205bytemuck = "1"
206blade-graphics.workspace = true
207blade-macros.workspace = true
208flume = "0.11"
209rand.workspace = true
210windows.workspace = true
211windows-core = "0.58"
212
213[[example]]
214name = "hello_world"
215path = "examples/hello_world.rs"
216
217[[example]]
218name = "image"
219path = "examples/image/image.rs"
220
221[[example]]
222name = "set_menus"
223path = "examples/set_menus.rs"
224
225[[example]]
226name = "window_shadow"
227path = "examples/window_shadow.rs"
228
229[[example]]
230name = "input"
231path = "examples/input.rs"
232
233[[example]]
234name = "shadow"
235path = "examples/shadow.rs"
236
237[[example]]
238name = "svg"
239path = "examples/svg/svg.rs"
240
241[[example]]
242name = "text_wrapper"
243path = "examples/text_wrapper.rs"
244
245[[example]]
246name = "opacity"
247path = "examples/opacity.rs"
248
249[[example]]
250name = "uniform_list"
251path = "examples/uniform_list.rs"