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
58http_client.workspace = true
59image.workspace = true
60inventory.workspace = true
61itertools.workspace = true
62log.workspace = true
63num_cpus = "1.13"
64parking = "2.0.0"
65parking_lot.workspace = true
66postage.workspace = true
67chrono.workspace = true
68profiling.workspace = true
69rand.workspace = true
70raw-window-handle = "0.6"
71refineable.workspace = true
72scheduler.workspace = true
73resvg = { version = "0.45.0", default-features = false, features = [
74 "text",
75 "system-fonts",
76 "memmap-fonts",
77] }
78usvg = { version = "0.45.0", default-features = false }
79util_macros.workspace = true
80schemars.workspace = true
81seahash = "4.1"
82serde.workspace = true
83serde_json.workspace = true
84slotmap.workspace = true
85smallvec.workspace = true
86async-channel.workspace = true
87stacksafe.workspace = true
88strum.workspace = true
89sum_tree.workspace = true
90taffy = "=0.9.0"
91thiserror.workspace = true
92gpui_util.workspace = true
93waker-fn = "1.2.0"
94lyon = "1.0"
95pin-project = "1.1.10"
96circular-buffer.workspace = true
97spin = "0.10.0"
98pollster.workspace = true
99url.workspace = true
100uuid.workspace = true
101web-time.workspace = true
102
103[target.'cfg(target_family = "wasm")'.dependencies]
104getrandom = { version = "0.3.4", features = ["wasm_js"] }
105uuid = { workspace = true, features = ["js"] }
106
107
108[target.'cfg(target_os = "macos")'.dependencies]
109block = "0.1"
110cocoa.workspace = true
111cocoa-foundation.workspace = true
112core-foundation.workspace = true
113core-foundation-sys.workspace = true
114core-graphics = "0.24"
115core-video.workspace = true
116core-text = "21"
117# WARNING: If you change this, you must also publish a new version of zed-font-kit to crates.io
118font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "110523127440aefb11ce0cf280ae7c5071337ec5", package = "zed-font-kit", version = "0.14.1-zed", optional = true }
119foreign-types = "0.5"
120log.workspace = true
121media.workspace = true
122objc.workspace = true
123objc2 = { version = "0.6", optional = true }
124objc2-metal = { version = "0.3", optional = true }
125mach2.workspace = 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", target_os = "windows"))'.dependencies]
133scap = { workspace = true, optional = true }
134
135
136
137[target.'cfg(target_os = "windows")'.dependencies]
138windows = { version = "0.61", features = ["Win32_Foundation"] }
139
140
141[dev-dependencies]
142backtrace.workspace = true
143collections = { workspace = true, features = ["test-support"] }
144env_logger.workspace = true
145gpui_platform.workspace = true
146lyon = { version = "1.0", features = ["extra"] }
147pretty_assertions.workspace = true
148rand.workspace = true
149scheduler = { workspace = true, features = ["test-support"] }
150unicode-segmentation.workspace = true
151gpui_util = { workspace = true }
152
153[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
154http_client = { workspace = true, features = ["test-support"] }
155reqwest_client = { workspace = true, features = ["test-support"] }
156
157[target.'cfg(target_family = "wasm")'.dev-dependencies]
158wasm-bindgen = { workspace = true }
159gpui_web.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"