Files
zed/crates/gpui_macos/Cargo.toml
T
Anthony Eid 328ad39817 gpui_platform: Expose headless renderer through bench support (#63244)
GPUI's `bench-support` feature provides the benchmark context and
headless-renderer interface without enabling `test-support`, but the
platform implementation remained available only through
`gpui_platform/test-support`. As a result, consumers could not use
`#[gpui::bench]` with a fully isolated feature graph because the
generated benchmark harness calls
`gpui_platform::current_headless_renderer()`.

This threads `bench-support` through `gpui_platform`, `gpui_macos`, and
`gpui_apple`, exposing the existing Metal headless renderer without
widening unrelated test window or prompt APIs. The existing benchmark
package now requests the platform's canonical `bench-support` feature.
Its other test-backed fixtures are intentionally unchanged and remain
outside this focused dependency fix.

Validation:

- Confirmed `gpui_apple/bench-support`, `gpui_macos/bench-support`, and
`gpui_platform/bench-support` resolve no `test-support` feature with
`cargo tree --locked --no-default-features --features bench-support -e
no-dev,features`.
- Ran `cargo check --locked -p benchmarks --benches` to compile every
existing `#[gpui::bench]` target against the real platform headless
renderer.
- Ran `cargo nextest run --locked -p gpui_apple -p gpui_macos -p
gpui_platform`.
- Ran `./script/clippy` for each changed platform package with
`--no-default-features --features bench-support`.
- Ran `cargo fmt --check`.

Release Notes:

- N/A
2026-08-26 11:00:10 +00:00

72 lines
2.2 KiB
TOML

[package]
name = "gpui_macos"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "Apache-2.0"
[lints]
workspace = true
[lib]
path = "src/gpui_macos.rs"
[features]
default = ["gpui/default"]
bench-support = ["gpui/bench-support", "gpui_apple/bench-support"]
test-support = ["gpui/test-support", "gpui_apple/test-support"]
runtime_shaders = ["gpui_apple/runtime_shaders"]
font-kit = ["dep:font-kit"]
screen-capture = ["gpui/screen-capture"]
[dependencies]
gpui.workspace = true
[target.'cfg(target_os = "macos")'.dependencies]
accesskit.workspace = true
accesskit_macos.workspace = true
anyhow.workspace = true
async-task.workspace = true
block.workspace = true
block2.workspace = true
cocoa.workspace = true
collections.workspace = true
core-foundation.workspace = true
core-foundation-sys.workspace = true
core-graphics.workspace = true
core-text.workspace = true
ctor.workspace = true
dispatch2 = "0.3.1"
# WARNING: If you change this, you must also publish a new version of zed-font-kit to crates.io
font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "94b0f28166665e8fd2f53ff6d268a14955c82269", package = "zed-font-kit", version = "0.14.1-zed", optional = true }
foreign-types.workspace = true
futures.workspace = true
gpui_apple.workspace = true
gpui_util.workspace = true
image.workspace = true
itertools.workspace = true
libc.workspace = true
log.workspace = true
mach2.workspace = true
media.workspace = true
metal.workspace = true
objc.workspace = true
objc2.workspace = true
objc2-app-kit.workspace = true
objc2-foundation.workspace = true
objc2-user-notifications.workspace = true
parking_lot.workspace = true
pathfinder_geometry.workspace = true
raw-window-handle.workspace = true
semver.workspace = true
smallvec.workspace = true
strum.workspace = true
uuid.workspace = true
# The macOS test-only window implementation depends on test-only APIs from both
# GPUI and the extracted renderer. A dependency does not inherit this crate's
# `cfg(test)`, so dev-dependencies enable those APIs only for test builds.
[target.'cfg(target_os = "macos")'.dev-dependencies]
gpui = { workspace = true, features = ["test-support"] }
gpui_apple = { workspace = true, features = ["test-support"] }