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
40 lines
1.1 KiB
TOML
40 lines
1.1 KiB
TOML
[package]
|
|
name = "gpui_platform"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
publish.workspace = true
|
|
license = "Apache-2.0"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[lib]
|
|
path = "src/gpui_platform.rs"
|
|
|
|
[features]
|
|
default = []
|
|
bench-support = ["gpui/bench-support", "gpui_macos/bench-support"]
|
|
font-kit = ["gpui_macos/font-kit"]
|
|
test-support = ["gpui/test-support", "gpui_macos/test-support", "gpui_windows/test-support"]
|
|
screen-capture = ["gpui/screen-capture", "gpui_macos/screen-capture", "gpui_windows/screen-capture", "gpui_linux/screen-capture"]
|
|
runtime_shaders = ["gpui_macos/runtime_shaders"]
|
|
wayland = ["gpui_linux/wayland"]
|
|
x11 = ["gpui_linux/x11"]
|
|
|
|
[dependencies]
|
|
gpui.workspace = true
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
gpui_macos.workspace = true
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
gpui_windows.workspace = true
|
|
gpui = { workspace = true, features = ["windows-manifest"] }
|
|
|
|
[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
|
|
gpui_linux.workspace = true
|
|
|
|
[target.'cfg(target_family = "wasm")'.dependencies]
|
|
gpui_web.workspace = true
|
|
console_error_panic_hook.workspace = true
|