Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

7.8 KB
Raw Blame
[package]
name = "gpui"
version = "0.2.2"
edition.workspace = true
authors = ["Nathan Sobo <[email protected]>"]
description = "Zed's GPU-accelerated UI framework"
repository = "https://github.com/zed-industries/zed"
publish = true
license = "Apache-2.0"
homepage = "https://gpui.rs"
readme = "README.md"
keywords = ["desktop", "gui", "immediate"]
categories = ["gui"]
autobenches = false


[lints]
workspace = true

[features]
default = ["font-kit", "wayland", "x11", "windows-manifest"]
test-support = [
    "bench_metrics?/test-support",
    "collections/test-support",
    "http_client/test-support",
    "wayland",
    "x11",
    "proptest",
    "dep:futures-concurrency",
    "dep:postage",
    "dep:web-time",
]
bench-support = ["profiler", "dep:criterion", "dep:bench_metrics"]
# Preserve the published feature name while consumers migrate to `bench-support`.
bench = ["bench-support"]
inspector = ["gpui_macros/inspector"]
# Tracks every entity handle so tests can assert nothing leaked. Also enabled
# by setting `GPUI_LEAK_DETECTION` when building; see `build.rs`.
leak-detection = []
font-kit = []
wayland = []
x11 = [
    "scap?/x11",
]
screen-capture = [
    "scap",
]
windows-manifest = ["dep:embed-resource"]
profiler = ["dep:hdrhistogram"]
stacker = ["dep:stacksafe"]
hot-reload = [
    "dep:async-tungstenite",
    "dep:dioxus-cli-config",
    "dep:dioxus-devtools-types",
    "dep:smol",
    "dep:subsecond",
]

[lib]
path = "src/gpui.rs"

[dependencies]
accesskit.workspace = true
anyhow.workspace = true
async-task.workspace = true
backtrace.workspace = true
bitflags.workspace = true

collections.workspace = true
bench_metrics = { workspace = true, optional = true }
criterion = { workspace = true, optional = true }
derive_more = { workspace = true, features = ["add", "add_assign", "mul", "mul_assign", "not"] }
etagere.workspace = true
futures.workspace = true
futures-concurrency = { workspace = true, optional = true }
gpui_macros.workspace = true
gpui_shared_string.workspace = true
http_client.workspace = true
icu_segmenter.workspace = true
image.workspace = true
inventory.workspace = true
itertools.workspace = true
log.workspace = true
num_cpus = "1.13"
parking = "2.0.0"
parking_lot.workspace = true
postage = { workspace = true, features = ["blocking"], optional = true }
proptest = { workspace = true, optional = true }
chrono = { workspace = true, default-features = true }
profiling.workspace = true
rand = { workspace = true, features = ["small_rng", "thread_rng"] }
raw-window-handle.workspace = true
regex = { workspace = true, default-features = true }
refineable.workspace = true
scheduler.workspace = true
resvg.workspace = true
usvg.workspace = true
ttf-parser = "0.25"
schemars = { workspace = true, features = ["derive"] }
seahash = "4.1"
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
slotmap.workspace = true
smallvec.workspace = true
stacksafe = { workspace = true, optional = true }
strum.workspace = true
sum_tree.workspace = true
taffy = { workspace = true, features = [
    "std",
    "taffy_tree",
    "flexbox",
    "grid",
    "block_layout",
    "float_layout",
    "content_size",
] }
thiserror.workspace = true
unicode-segmentation.workspace = true
gpui_util.workspace = true
hdrhistogram = { workspace = true, optional = true }
waker-fn = "1.2.0"
lyon = "1.0"
pin-project = "1.1.10"
spin.workspace = true
url.workspace = true
uuid = { workspace = true, features = ["v4"] }
web-time = { workspace = true, optional = true }
heapless.workspace = true

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
async-channel.workspace = true

[target.'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))'.dependencies]
async-channel = { workspace = true, features = ["std"] }

[target.'cfg(not(target_family = "wasm"))'.dependencies]
pollster.workspace = true

[target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows", target_os = "ios"))'.dependencies]
async-tungstenite = { workspace = true, optional = true }
dioxus-cli-config = { version = "=0.7.10", optional = true }
dioxus-devtools-types = { version = "=0.7.10", optional = true }
smol = { workspace = true, optional = true }
subsecond = { version = "=0.7.10", optional = true }

[target.'cfg(target_family = "wasm")'.dependencies]
getrandom = { version = "0.3.4", features = ["wasm_js"] }
uuid = { workspace = true, features = ["js"] }


[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
objc2-core-foundation.workspace = true
objc2-core-video = { workspace = true, features = ["CVPixelBuffer"] }

[target.'cfg(target_os = "macos")'.dependencies]
log.workspace = true
objc2 = { workspace = true, optional = true }
objc2-metal = { version = "0.3", optional = true }

[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "windows"))'.dependencies]
scap = { workspace = true, optional = true }

[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
libc.workspace = true


[target.'cfg(target_os = "windows")'.dependencies]
windows = { workspace = true, features = [
    "Win32_System_Power",
    "Win32_System_RemoteDesktop",
    "Win32_System_WindowsProgramming",
] }


[dev-dependencies]
backtrace.workspace = true
collections = { workspace = true, features = ["test-support"] }
env_logger.workspace = true
futures-concurrency.workspace = true
postage = { workspace = true, features = ["blocking"] }
web-time.workspace = true
gpui_platform = { workspace = true, features = ["font-kit", "wayland", "x11"] }
gpui_util.workspace = true
lyon = { version = "1.0", features = ["extra"] }
rand = { workspace = true, default-features = true }
scheduler = { workspace = true, features = ["test-support"] }
util_macros.workspace = true

[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
http_client = { workspace = true, features = ["test-support"] }
proptest.workspace = true
reqwest_client = { workspace = true, features = ["test-support"] }

[target.'cfg(target_family = "wasm")'.dev-dependencies]
gpui_web.workspace = true
wasm-bindgen.workspace = true
web-sys.workspace = true

[build-dependencies]
embed-resource = { version = "3.0", optional = true }

[package.metadata.cargo-shear]
ignored = [
    "getrandom",
    "objc2",
    "objc2-metal",
]
ignored-paths = ["src/_ownership_and_data_flow.rs", "benches/focus_cleanup.rs"]

[[example]]
name = "hello_world"
path = "examples/hello_world.rs"

[[example]]
name = "move_entity_between_windows"
path = "examples/move_entity_between_windows.rs"

[[example]]
name = "image"
path = "examples/image/image.rs"

[[example]]
name = "input"
path = "examples/input.rs"

[[example]]
name = "on_window_close_quit"
path = "examples/on_window_close_quit.rs"

[[example]]
name = "window_movable"
path = "examples/window_movable.rs"

[[example]]
name = "opacity"
path = "examples/opacity.rs"

[[example]]
name = "pattern"
path = "examples/pattern.rs"

[[example]]
name = "set_menus"
path = "examples/set_menus.rs"

[[example]]
name = "system_notifications"
path = "examples/system_notifications.rs"


[[example]]
name = "shadow"
path = "examples/shadow.rs"

[[example]]
name = "svg"
path = "examples/svg/svg.rs"

[[example]]
name = "tab_stop"
path = "examples/tab_stop.rs"

[[example]]
name = "text"
path = "examples/text.rs"

[[example]]
name = "text_wrapper"
path = "examples/text_wrapper.rs"

[[example]]
name = "tree"
path = "examples/tree.rs"

[[example]]
name = "uniform_list"
path = "examples/uniform_list.rs"

[[example]]
name = "window_shadow"
path = "examples/window_shadow.rs"

[[example]]
name = "grid_layout"
path = "examples/grid_layout.rs"

[[example]]
name = "list_example"
path = "examples/list_example.rs"

[[example]]
name = "mouse_pressure"
path = "examples/mouse_pressure.rs"

[[example]]
name = "a11y"
path = "examples/a11y.rs"

[[example]]
name = "view_example"
path = "examples/view_example/view_example_main.rs"

[[example]]
name = "toggle_headless"
path = "examples/toggle_headless.rs"