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