1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
[]
= "gpuikit"
= "0.8.0"
= "2021"
= ["Nate Butler <iamnbutler@gmail.com>"]
= "MIT OR Apache-2.0"
= "https://github.com/iamnbutler/gpuikit"
= "https://github.com/iamnbutler/gpuikit"
= "A UI toolkit for GPUI applications"
= "README.md"
= ["gpui", "ui", "components", "toolkit", "gui"]
= ["gui", "graphics"]
# The README's screenshot lives in `.github/media/` and is linked by absolute
# URL, so crates.io renders it without the file shipping in the package. Note
# it cannot live in `assets/`: that folder is `#[folder = "assets"]` for
# rust-embed, so anything in it is compiled into every consumer's binary.
= [".github/"]
# This crate's own floor, not a promise about the whole dependency tree: it uses
# async closures (stable in 1.85), and gpui is edition 2024, which needs the same
# 1.85. The declared 1.75 was never true. Dependencies declare their own, higher
# numbers and cargo does not hold them back — see README's "Minimum Rust version".
= "1.85"
[]
= "gpuikit"
= "src/lib.rs"
# Every example is gated behind the no-op `examples` feature, so that
# `cargo test`, `cargo build --all-targets` and `cargo check --all-targets` do
# not each link eight copies of gpui — see `[profile.dev]` below and
# `examples/README.md`. Run one with `--features examples`.
#
# A new example is declared here, with `required-features`. An autodiscovered
# target — any top-level `examples/*.rs`, or `examples/*/main.rs` — cannot carry
# `required-features`, so it would be built by every one of those commands
# regardless. `src/build_profile_guard.rs` reads `examples/` from disk to catch
# exactly that.
[[]]
= "markdown_selection"
= "examples/markdown_selection.rs"
= ["examples"]
[[]]
= "markdown_streaming"
= "examples/markdown_streaming.rs"
= ["examples"]
[[]]
= "showcase"
= "examples/showcase.rs"
= ["examples"]
[[]]
= "tasks"
= "examples/tasks.rs"
= ["examples"]
[[]]
= "input_sandbox"
= "examples/input/sandbox.rs"
= ["examples"]
[[]]
= "dialog_example"
= "examples/dialog_example.rs"
= ["examples"]
[[]]
= "popover_demo"
= "examples/popover_demo.rs"
= ["examples"]
[[]]
= "context_menu"
= "examples/context_menu.rs"
= ["examples"]
[]
# GPUI framework (from gpui-unofficial on crates.io)
= { = "gpui-unofficial", = "1.14.2" }
= { = "gpui-platform-gpui-unofficial", = "1.14.2", = ["font-kit"] }
= "8.2.0"
= "1.0.79"
= { = "1.0", = ["derive"] }
= "1.0"
= "0.4"
# Input module dependencies
= "0.3"
= "1.10"
# `std::time::Instant::now()` panics on wasm32-unknown-unknown; web-time
# re-exports the std types unchanged on native targets.
= "1"
# No async runtime here on purpose. `smol::Timer` is `async_io::Timer`, and
# constructing one spawns the process-global `async-io` OS thread, whose
# `main_loop` has no exit path — it was still in the reactor at process exit
# and aborted the test binary after every test had passed (#190). Delays go
# through gpui's own `BackgroundExecutor::timer`, which is also the
# deterministic clock under `#[gpui::test]`. See `src/undying_thread_guard.rs`.
# Markdown parsing
= { = "0.13.4", = false, = ["simd"] }
# Closes syntax a partially streamed markdown document leaves open, so a
# half-written `**bold` does not flash as literal asterisks (optional)
= { = "0.1", = true }
# Editor dependencies (optional)
= { = "5.3.0", = true }
= { = "gpui-util-gpui-unofficial", = "1.14.2", = true }
# Schema generation (optional)
= { = "0.8", = true }
# rust-embed's default debug behavior reads assets from disk at runtime, and
# the browser has no disk — a debug wasm build would fail to load every icon
# and font. `debug-embed` compiles the assets in for every profile; gating it
# to wasm keeps native debug builds' fast from-disk iteration. Consumers get
# this via feature unification without knowing the trick exists.
[]
= { = "8.2.0", = ["debug-embed"] }
[]
= { = "gpui-unofficial", = "1.14.2", = ["test-support"] }
= "3.8"
= "1.4"
[]
= []
= ["dep:syntect", "dep:gpui_util"]
= ["dep:schemars"]
# Compile Metal shaders at runtime instead of at build time (no Xcode Metal
# toolchain required).
= ["gpui_platform/runtime_shaders"]
# Close unterminated markdown syntax before parsing, so a streaming document
# does not flicker between literal markers and styled text. Off by default:
# mdstitch declares rust-version 1.95.0, above this crate's own 1.85 floor, so
# enabling it raises the toolchain a consumer needs. Keep the README's feature
# table in step with these numbers.
= ["dep:mdstitch"]
# Enables nothing. It exists only so that every `[[example]]` above can require
# it, keeping eight full links of gpui out of `cargo test` and
# `cargo {build,check} --all-targets`. Note that `--all-features` turns it back
# on — cargo offers no way to exclude a feature from that flag — so
# `cargo test --all-features` still links all eight.
= []
# Lints
[]
= "warn"
= { = "warn", = -1 }
= "allow"
[]
# Every callback field spells the full gpui handler signature —
# `Option<Box<dyn Fn(&ClickEvent, &mut Window, &mut App)>>` and its variants.
# The signature is the information a reader at the field wants; a type alias
# per element would hide it behind a name that differs at every site anyway.
= "allow"
# Optimize release builds
[]
= true
= 1
= 3
# Speed up debug builds
[]
= 0
# Not `2`. Full DWARF for this crate *and* for gpui beneath it is the bulk of
# what `ld` holds in memory, and cargo sizes `-j` from the CPU count with no
# knowledge of a memory limit, so several of those links run at once and the
# kernel kills one — `ld terminated with signal 9 [Killed]`, naming no crate and
# no symbol. Line tables keep file and line in every backtrace; only the type
# and variable detail a debugger wants is gone, and a debugging session asks for
# it on that build alone with `RUSTFLAGS="-Cdebuginfo=2"`.
= "line-tables-only"
# Dependencies — gpui above all — are compiled once and then only linked, so
# optimizing them costs nothing on an incremental build of this crate and is
# the difference between a debug showcase that draws smoothly and one that
# does not. `"*"` matches dependencies only, never this crate, so iterating
# here compiles exactly as fast as before.
[]
= 2
# Package metadata for crates.io
[]
= true
= ["--cfg", "docsrs"]