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