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"
  7publish.workspace = true
  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", "objc2", "objc2-metal"]
 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[target.'cfg(target_os = "windows")'.build-dependencies]
122embed-resource = "3.0"
123
124[target.'cfg(target_os = "macos")'.build-dependencies]
125bindgen = "0.70.0"
126cbindgen = { version = "0.28.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
139objc = "0.2"
140objc2 = { version = "0.5", optional = true }
141objc2-metal = { version = "0.2", optional = true }
142#TODO: replace with "objc2"
143metal.workspace = true
144
145[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))'.dependencies]
146pathfinder_geometry = "0.5"
147
148[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
149# Always used
150flume = "0.11"
151oo7 = { git = "https://github.com/zed-industries/oo7", branch = "avoid-crypto-panic" }
152
153# Used in both windowing options
154ashpd = { workspace = true, optional = true }
155blade-graphics = { workspace = true, optional = true }
156blade-macros = { workspace = true, optional = true }
157blade-util = { workspace = true, optional = true }
158bytemuck = { version = "1", optional = true }
159cosmic-text = { git = "https://github.com/pop-os/cosmic-text", rev = "542b20c", optional = true }
160font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "40391b7", features = [
161    "source-fontconfig-dlopen",
162], optional = true }
163calloop = { version = "0.13.0" }
164filedescriptor = { version = "0.8.2", optional = true }
165open = { version = "5.2.0", optional = true }
166
167# Wayland
168calloop-wayland-source = { version = "0.3.0", optional = true }
169wayland-backend = { version = "0.3.3", features = [
170    "client_system",
171    "dlopen",
172], optional = true }
173wayland-client = { version = "0.31.2", optional = true }
174wayland-cursor = { version = "0.31.1", optional = true }
175wayland-protocols = { version = "0.31.2", features = [
176    "client",
177    "staging",
178    "unstable",
179], optional = true }
180wayland-protocols-plasma = { version = "0.2.0", features = [
181    "client",
182], optional = true }
183
184
185# X11
186as-raw-xcb-connection = { version = "1", optional = true }
187x11rb = { version = "0.13.1", features = [
188    "allow-unsafe-code",
189    "xkb",
190    "randr",
191    "xinput",
192    "cursor",
193    "resource_manager",
194    "sync",
195], optional = true }
196xkbcommon = { git = "https://github.com/ConradIrwin/xkbcommon-rs", rev = "fcbb4612185cc129ceeff51d22f7fb51810a03b2", features = [
197    "wayland",
198    "x11",
199], optional = true }
200xim = { git = "https://github.com/XDeme1/xim-rs", rev = "d50d461764c2213655cd9cf65a0ea94c70d3c4fd", features = [
201    "x11rb-xcb",
202    "x11rb-client",
203], optional = true }
204x11-clipboard = { version = "0.9.3", optional = true }
205
206[target.'cfg(windows)'.dependencies]
207blade-util.workspace = true
208bytemuck = "1"
209blade-graphics.workspace = true
210blade-macros.workspace = true
211flume = "0.11"
212rand.workspace = true
213windows.workspace = true
214windows-core = "0.58"
215
216[[example]]
217name = "hello_world"
218path = "examples/hello_world.rs"
219
220[[example]]
221name = "image"
222path = "examples/image/image.rs"
223
224[[example]]
225name = "set_menus"
226path = "examples/set_menus.rs"
227
228[[example]]
229name = "window_shadow"
230path = "examples/window_shadow.rs"
231
232[[example]]
233name = "input"
234path = "examples/input.rs"
235
236[[example]]
237name = "shadow"
238path = "examples/shadow.rs"
239
240[[example]]
241name = "svg"
242path = "examples/svg/svg.rs"
243
244[[example]]
245name = "text_wrapper"
246path = "examples/text_wrapper.rs"
247
248[[example]]
249name = "opacity"
250path = "examples/opacity.rs"
251
252[[example]]
253name = "uniform_list"
254path = "examples/uniform_list.rs"