Files
zed/crates/gpui_linux/Cargo.toml
T
Xin Zhao 98f75a23bc Remove some unnecessary dependencies (#64862)
## Summary

Some dependencies were originally introduced for only a few specific
functions that can either be fulfilled by existing dependencies or
easily implemented in-tree. This PR removes or replaces them:

1. `json_dotpath`: Removed. We do not use the dot-path query feature;
standard methods in `serde_json` are sufficient for our use case.
2. `crossbeam`: Replaced with the more lightweight `crossbeam-queue`.
3. `take-until`: Removed. Calls to `take_until` are replaced with
`take_while_inclusive` from `itertools`, which is already widely used in
Zed.
4. `x11-clipboard`: Removed. It is deprecated and was only an unused
entry left in `Cargo.toml`.
5. `portable-pty`: Removed. We only used the `ExitStatus` transformation
logic from this crate, which has now been inlined into the Zed codebase.

Together, these changes reduce the total crate count from 1,727 to 1,717
during a Linux `cargo build`, slightly improving compile times.

## Testing

This is a refactoring PR with no functional changes. Existing tests were
run locally to ensure no regressions were introduced.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [ ] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [ ] Tests cover the new or changed behavior.

Release Notes:

- N/A
- [GPUI] N/A
2026-09-28 08:56:15 +00:00

136 lines
3.3 KiB
TOML

[package]
name = "gpui_linux"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "Apache-2.0"
[lints]
workspace = true
[lib]
path = "src/gpui_linux.rs"
doctest = false
[features]
default = ["wayland", "x11"]
test-support = ["gpui/test-support"]
wayland = [
"bitflags",
"gpui_wgpu",
"ashpd/wayland",
"calloop-wayland-source",
"wayland-backend",
"wayland-client",
"wayland-cursor",
"wayland-protocols",
"wayland-protocols-plasma",
"wayland-protocols-wlr",
"filedescriptor",
"xkbcommon/wayland",
"open",
"gpui/wayland",
]
x11 = [
"gpui_wgpu",
"ashpd",
"as-raw-xcb-connection",
"x11rb",
"xkbcommon/x11",
"xim",
"filedescriptor",
"open",
"scap?/x11",
]
screen-capture = [
"gpui/screen-capture",
"scap",
]
[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
accesskit.workspace = true
accesskit_unix.workspace = true
anyhow.workspace = true
bytemuck = "1"
collections.workspace = true
futures.workspace = true
gpui.workspace = true
gpui_util.workspace = true
gpui_wgpu = { workspace = true, optional = true, features = ["font-kit"] }
http_client.workspace = true
libc.workspace = true
log.workspace = true
parking_lot.workspace = true
smallvec.workspace = true
smol.workspace = true
strum.workspace = true
url.workspace = true
uuid.workspace = true
# Always used
oo7 = { version = "0.6", default-features = false, features = [
"async-std",
"native_crypto",
] }
calloop = "0.14.3"
notify-rust.workspace = true
raw-window-handle.workspace = true
# Used in both windowing options
ashpd = { workspace = true, optional = true }
bitflags = { workspace = true, optional = true }
filedescriptor = { version = "0.8.2", optional = true }
open = { version = "5.2.0", optional = true }
xkbcommon = { version = "0.8.0", default-features = false, optional = true }
# Screen capture
scap = { workspace = true, optional = true }
# Wayland
calloop-wayland-source = { version = "0.4.1", optional = true }
wayland-backend = { version = "0.3.15", features = [
"client_system",
"dlopen",
"log",
], optional = true }
wayland-client = { version = "0.31.11", optional = true }
wayland-cursor = { version = "0.31.11", optional = true }
wayland-protocols = { version = "0.32.9", features = [
"client",
"staging",
"unstable",
], optional = true }
wayland-protocols-plasma = { version = "0.3.9", features = [
"client",
], optional = true }
wayland-protocols-wlr = { version = "0.3.9", features = [
"client",
], optional = true }
# X11
as-raw-xcb-connection = { version = "1", optional = true }
x11rb = { version = "0.13.1", features = [
"allow-unsafe-code",
"xkb",
"randr",
"xinput",
"cursor",
"resource_manager",
"sync",
"dri3",
], optional = true }
# WARNING: If you change this, you must also publish a new version of zed-xim to crates.io
xim = { git = "https://github.com/zed-industries/xim-rs.git", rev = "16f35a2c881b815a2b6cdfd6687988e84f8447d8", features = [
"x11rb-xcb",
"x11rb-client",
], package = "zed-xim", version = "0.4.0-zed", optional = true }
[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dev-dependencies]
gpui = { workspace = true, features = ["test-support"] }
[package.metadata.cargo-shear]
ignored = ["bitflags", "scap"]