Files
zed/crates/ui/Cargo.toml
T
Chris BiscardiandKirill Bulatov bf2d51bcfd Implement inspector flag (#62920)
# Objective

Make it easy to conditionally enable the gpui inspector, with a goal of
eventually turning it on in nightly.

## Solution

The new `zed/inspector` flag (and supporting flags in other crates)
enables the relevant inspector features in `gpui`, `ui`, and
`inspector_ui` to be able to display the gpui inspector.

## Testing

- Enabling the inspector adds about 5mb to the binary, and for context
the zed binary is > 400mb at this time.
- Observationally, the inspector doesn't affect performance in a
meaningful way, but I did not run profiling.

```
# release with inspector (inspector on)
cargo run --release --features inspector
# release without inspector (inspector off)
cargo run --release
# dev build with debug assertions (inspector on)
cargo run
```

then trigger `dev::ToggleInspector`.

- linux: `ctrl-alt-i`
- windows: `shift-alt-i`
- macos: `cmd-alt-i`

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- N/A

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2026-08-20 22:09:43 +00:00

46 lines
929 B
TOML

[package]
name = "ui"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "GPL-3.0-or-later"
[lints]
workspace = true
[lib]
name = "ui"
path = "src/ui.rs"
[dependencies]
chrono.workspace = true
component.workspace = true
documented.workspace = true
gpui.workspace = true
gpui_macros.workspace = true
icons.workspace = true
itertools.workspace = true
log.workspace = true
menu.workspace = true
num-format.workspace = true
schemars.workspace = true
serde.workspace = true
smallvec.workspace = true
strum.workspace = true
theme.workspace = true
ui_macros.workspace = true
web-time.workspace = true
gpui_util.workspace = true
[dev-dependencies]
gpui = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] }
theme_settings.workspace = true
[package.metadata.cargo-shear]
ignored = ["log"]
[features]
default = []
derive_inspector_reflection = []