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
148lyon = { version = "1.0", features = ["extra"] }
149pretty_assertions.workspace = true
150rand.workspace = true
151scheduler = { workspace = true, features = ["test-support"] }
152unicode-segmentation.workspace = true
153gpui_util = { workspace = true }
154proptest = { workspace = true }
155
156[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
157http_client = { workspace = true, features = ["test-support"] }
158reqwest_client = { workspace = true, features = ["test-support"] }
159
160[target.'cfg(target_family = "wasm")'.dev-dependencies]
161wasm-bindgen = { workspace = true }
162gpui_web.workspace = true
163
164[build-dependencies]
165embed-resource = { version = "3.0", optional = true }
166
167[target.'cfg(target_os = "macos")'.build-dependencies]
168bindgen = "0.71"
169cbindgen = { version = "0.28.0", default-features = false }
170naga.workspace = true
171
172
173
174
175[[example]]
176name = "hello_world"
177path = "examples/hello_world.rs"
178
179[[example]]
180name = "image"
181path = "examples/image/image.rs"
182
183[[example]]
184name = "input"
185path = "examples/input.rs"
186
187[[example]]
188name = "on_window_close_quit"
189path = "examples/on_window_close_quit.rs"
190
191[[example]]
192name = "opacity"
193path = "examples/opacity.rs"
194
195[[example]]
196name = "pattern"
197path = "examples/pattern.rs"
198
199[[example]]
200name = "set_menus"
201path = "examples/set_menus.rs"
202
203[[example]]
204name = "shadow"
205path = "examples/shadow.rs"
206
207[[example]]
208name = "svg"
209path = "examples/svg/svg.rs"
210
211[[example]]
212name = "tab_stop"
213path = "examples/tab_stop.rs"
214
215[[example]]
216name = "text"
217path = "examples/text.rs"
218
219[[example]]
220name = "text_wrapper"
221path = "examples/text_wrapper.rs"
222
223[[example]]
224name = "tree"
225path = "examples/tree.rs"
226
227[[example]]
228name = "uniform_list"
229path = "examples/uniform_list.rs"
230
231[[example]]
232name = "window_shadow"
233path = "examples/window_shadow.rs"
234
235[[example]]
236name = "grid_layout"
237path = "examples/grid_layout.rs"
238
239[[example]]
240name = "mouse_pressure"
241path = "examples/mouse_pressure.rs"