Cargo.toml

  1[package]
  2name = "gpui"
  3version = "0.2.2"
  4edition.workspace = true
  5authors = ["Nathan Sobo <nathan@zed.dev>"]
  6description = "Zed's GPU-accelerated UI framework"
  7repository = "https://github.com/zed-industries/zed"
  8publish = true
  9license = "Apache-2.0"
 10homepage = "https://gpui.rs"
 11readme = "README.md"
 12keywords = ["desktop", "gui", "immediate"]
 13categories = ["gui"]
 14
 15
 16[lints]
 17workspace = true
 18
 19[features]
 20default = ["font-kit", "wayland", "x11", "windows-manifest"]
 21test-support = [
 22    "leak-detection",
 23    "collections/test-support",
 24    "http_client/test-support",
 25    "wayland",
 26    "x11",
 27    "proptest",
 28]
 29inspector = ["gpui_macros/inspector"]
 30leak-detection = ["backtrace"]
 31wayland = [
 32    "bitflags",
 33]
 34x11 = [
 35    "scap?/x11",
 36]
 37screen-capture = [
 38    "scap",
 39]
 40windows-manifest = ["dep:embed-resource"]
 41
 42[lib]
 43path = "src/gpui.rs"
 44doctest = false
 45
 46[dependencies]
 47anyhow.workspace = true
 48async-task = "4.7"
 49backtrace = { workspace = true, optional = true }
 50bitflags = { workspace = true, optional = true }
 51
 52collections.workspace = true
 53ctor.workspace = true
 54derive_more.workspace = true
 55etagere = "0.2"
 56futures.workspace = true
 57futures-concurrency.workspace = true
 58gpui_macros.workspace = true
 59http_client.workspace = true
 60image.workspace = true
 61inventory.workspace = true
 62itertools.workspace = true
 63log.workspace = true
 64num_cpus = "1.13"
 65parking = "2.0.0"
 66parking_lot.workspace = true
 67postage.workspace = true
 68proptest = { workspace = true, optional = true }
 69chrono.workspace = true
 70profiling.workspace = true
 71rand.workspace = true
 72raw-window-handle = "0.6"
 73regex.workspace = true
 74refineable.workspace = true
 75scheduler.workspace = true
 76resvg = { version = "0.45.0", default-features = false, features = [
 77    "text",
 78    "system-fonts",
 79    "memmap-fonts",
 80    "raster-images"
 81] }
 82usvg = { version = "0.45.0", default-features = false }
 83ttf-parser = "0.25"
 84util_macros.workspace = true
 85schemars.workspace = true
 86seahash = "4.1"
 87serde.workspace = true
 88serde_json.workspace = true
 89slotmap.workspace = true
 90smallvec.workspace = true
 91async-channel.workspace = true
 92stacksafe.workspace = true
 93strum.workspace = true
 94sum_tree.workspace = true
 95taffy = "=0.9.0"
 96thiserror.workspace = true
 97gpui_util.workspace = true
 98waker-fn = "1.2.0"
 99lyon = "1.0"
100pin-project = "1.1.10"
101spin = "0.10.0"
102pollster.workspace = true
103url.workspace = true
104uuid.workspace = true
105web-time.workspace = true
106
107[target.'cfg(target_family = "wasm")'.dependencies]
108getrandom = { version = "0.3.4", features = ["wasm_js"] }
109uuid = { workspace = true, features = ["js"] }
110
111
112[target.'cfg(target_os = "macos")'.dependencies]
113block = "0.1"
114cocoa.workspace = true
115cocoa-foundation.workspace = true
116core-foundation.workspace = true
117core-foundation-sys.workspace = true
118core-graphics = "0.24"
119core-video.workspace = true
120core-text = "21"
121# WARNING: If you change this, you must also publish a new version of zed-font-kit to crates.io
122font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "110523127440aefb11ce0cf280ae7c5071337ec5", package = "zed-font-kit", version = "0.14.1-zed", optional = true }
123foreign-types = "0.5"
124log.workspace = true
125media.workspace = true
126objc.workspace = true
127objc2 = { version = "0.6", optional = true }
128objc2-metal = { version = "0.3", optional = true }
129mach2.workspace = true
130#TODO: replace with "objc2"
131metal.workspace = true
132
133[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))'.dependencies]
134pathfinder_geometry = "0.5"
135
136[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "windows"))'.dependencies]
137scap = { workspace = true, optional = true }
138
139
140
141[target.'cfg(target_os = "windows")'.dependencies]
142windows = { version = "0.61", features = ["Win32_Foundation"] }
143
144
145[dev-dependencies]
146backtrace.workspace = true
147collections = { workspace = true, features = ["test-support"] }
148env_logger.workspace = true
149gpui_platform = { workspace = true, features = ["font-kit"] }
150gpui_util = { workspace = true }
151lyon = { version = "1.0", features = ["extra"] }
152proptest = { workspace = true }
153rand.workspace = true
154scheduler = { workspace = true, features = ["test-support"] }
155unicode-segmentation = { workspace = true }
156
157[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
158http_client = { workspace = true, features = ["test-support"] }
159reqwest_client = { workspace = true, features = ["test-support"] }
160
161[target.'cfg(target_family = "wasm")'.dev-dependencies]
162wasm-bindgen = { workspace = true }
163gpui_web.workspace = true
164
165[build-dependencies]
166embed-resource = { version = "3.0", optional = true }
167
168[target.'cfg(target_os = "macos")'.build-dependencies]
169bindgen = "0.71"
170cbindgen = { version = "0.28.0", default-features = false }
171naga.workspace = true
172
173
174
175
176[[example]]
177name = "hello_world"
178path = "examples/hello_world.rs"
179
180[[example]]
181name = "image"
182path = "examples/image/image.rs"
183
184[[example]]
185name = "input"
186path = "examples/input.rs"
187
188[[example]]
189name = "on_window_close_quit"
190path = "examples/on_window_close_quit.rs"
191
192[[example]]
193name = "opacity"
194path = "examples/opacity.rs"
195
196[[example]]
197name = "pattern"
198path = "examples/pattern.rs"
199
200[[example]]
201name = "set_menus"
202path = "examples/set_menus.rs"
203
204[[example]]
205name = "shadow"
206path = "examples/shadow.rs"
207
208[[example]]
209name = "svg"
210path = "examples/svg/svg.rs"
211
212[[example]]
213name = "tab_stop"
214path = "examples/tab_stop.rs"
215
216[[example]]
217name = "text"
218path = "examples/text.rs"
219
220[[example]]
221name = "text_wrapper"
222path = "examples/text_wrapper.rs"
223
224[[example]]
225name = "tree"
226path = "examples/tree.rs"
227
228[[example]]
229name = "uniform_list"
230path = "examples/uniform_list.rs"
231
232[[example]]
233name = "window_shadow"
234path = "examples/window_shadow.rs"
235
236[[example]]
237name = "grid_layout"
238path = "examples/grid_layout.rs"
239
240[[example]]
241name = "list_example"
242path = "examples/list_example.rs"
243
244[[example]]
245name = "mouse_pressure"
246path = "examples/mouse_pressure.rs"