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"
73refineable.workspace = true
74scheduler.workspace = true
75resvg = { version = "0.45.0", default-features = false, features = [
76 "text",
77 "system-fonts",
78 "memmap-fonts",
79] }
80usvg = { version = "0.45.0", default-features = false }
81util_macros.workspace = true
82schemars.workspace = true
83seahash = "4.1"
84serde.workspace = true
85serde_json.workspace = true
86slotmap.workspace = true
87smallvec.workspace = true
88async-channel.workspace = true
89stacksafe.workspace = true
90strum.workspace = true
91sum_tree.workspace = true
92taffy = "=0.9.0"
93thiserror.workspace = true
94gpui_util.workspace = true
95waker-fn = "1.2.0"
96lyon = "1.0"
97pin-project = "1.1.10"
98circular-buffer.workspace = true
99spin = "0.10.0"
100pollster.workspace = true
101url.workspace = true
102uuid.workspace = true
103web-time.workspace = true
104
105[target.'cfg(target_family = "wasm")'.dependencies]
106getrandom = { version = "0.3.4", features = ["wasm_js"] }
107uuid = { workspace = true, features = ["js"] }
108
109
110[target.'cfg(target_os = "macos")'.dependencies]
111block = "0.1"
112cocoa.workspace = true
113cocoa-foundation.workspace = true
114core-foundation.workspace = true
115core-foundation-sys.workspace = true
116core-graphics = "0.24"
117core-video.workspace = true
118core-text = "21"
119# WARNING: If you change this, you must also publish a new version of zed-font-kit to crates.io
120font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "110523127440aefb11ce0cf280ae7c5071337ec5", package = "zed-font-kit", version = "0.14.1-zed", optional = true }
121foreign-types = "0.5"
122log.workspace = true
123media.workspace = true
124objc.workspace = true
125objc2 = { version = "0.6", optional = true }
126objc2-metal = { version = "0.3", optional = true }
127mach2.workspace = true
128#TODO: replace with "objc2"
129metal.workspace = true
130
131[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))'.dependencies]
132pathfinder_geometry = "0.5"
133
134[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "windows"))'.dependencies]
135scap = { workspace = true, optional = true }
136
137
138
139[target.'cfg(target_os = "windows")'.dependencies]
140windows = { version = "0.61", features = ["Win32_Foundation"] }
141
142
143[dev-dependencies]
144backtrace.workspace = true
145collections = { workspace = true, features = ["test-support"] }
146env_logger.workspace = true
147gpui_platform = { workspace = true, features = ["font-kit"] }
148lyon = { version = "1.0", features = ["extra"] }
149rand.workspace = true
150scheduler = { workspace = true, features = ["test-support"] }
151unicode-segmentation.workspace = true
152gpui_util = { workspace = true }
153proptest = { workspace = true }
154
155[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
156http_client = { workspace = true, features = ["test-support"] }
157reqwest_client = { workspace = true, features = ["test-support"] }
158
159[target.'cfg(target_family = "wasm")'.dev-dependencies]
160wasm-bindgen = { workspace = true }
161gpui_web.workspace = true
162
163[build-dependencies]
164embed-resource = { version = "3.0", optional = true }
165
166[target.'cfg(target_os = "macos")'.build-dependencies]
167bindgen = "0.71"
168cbindgen = { version = "0.28.0", default-features = false }
169naga.workspace = true
170
171
172
173
174[[example]]
175name = "hello_world"
176path = "examples/hello_world.rs"
177
178[[example]]
179name = "image"
180path = "examples/image/image.rs"
181
182[[example]]
183name = "input"
184path = "examples/input.rs"
185
186[[example]]
187name = "on_window_close_quit"
188path = "examples/on_window_close_quit.rs"
189
190[[example]]
191name = "opacity"
192path = "examples/opacity.rs"
193
194[[example]]
195name = "pattern"
196path = "examples/pattern.rs"
197
198[[example]]
199name = "set_menus"
200path = "examples/set_menus.rs"
201
202[[example]]
203name = "shadow"
204path = "examples/shadow.rs"
205
206[[example]]
207name = "svg"
208path = "examples/svg/svg.rs"
209
210[[example]]
211name = "tab_stop"
212path = "examples/tab_stop.rs"
213
214[[example]]
215name = "text"
216path = "examples/text.rs"
217
218[[example]]
219name = "text_wrapper"
220path = "examples/text_wrapper.rs"
221
222[[example]]
223name = "tree"
224path = "examples/tree.rs"
225
226[[example]]
227name = "uniform_list"
228path = "examples/uniform_list.rs"
229
230[[example]]
231name = "window_shadow"
232path = "examples/window_shadow.rs"
233
234[[example]]
235name = "grid_layout"
236path = "examples/grid_layout.rs"
237
238[[example]]
239name = "mouse_pressure"
240path = "examples/mouse_pressure.rs"