Files
Mike-Solar ad7c965c5a feat(gpui): add dock, effect stack, node graph, and timeline widgets
Implements four workspace widget modules with accompanying learn examples:

- dock: dockable panel layout system (tabs, splits, drag-to-dock) with
  serde-based persistence via PanelRegistry / DockLayoutState
- effect_stack: linear effect-stack inspector widget
- node_graph: node-graph editor (nodes, ports, wires, pan/zoom canvas)
- timeline: video-editing timeline (tracks, clips, ruler, playhead)

Timeline snapping prefers the earlier frame when two snap points are
equally close, with SnapKind priority breaking same-frame ties.
2026-08-09 03:31:06 +08:00

320 lines
7.4 KiB
TOML

[package]
name = "gpui"
version = "0.2.2"
edition.workspace = true
authors = ["Nathan Sobo <nathan@zed.dev>"]
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"]
[lints]
workspace = true
[features]
default = ["font-kit", "wayland", "x11", "windows-manifest"]
test-support = [
"leak-detection",
"collections/test-support",
"wayland",
"x11",
"proptest",
]
inspector = ["gpui_macros/inspector"]
leak-detection = ["backtrace"]
wayland = ["bitflags"]
x11 = ["scap?/x11"]
screen-capture = ["scap"]
windows-manifest = ["dep:embed-resource"]
input-latency-histogram = ["dep:hdrhistogram"]
[lib]
path = "src/gpui.rs"
doctest = false
[dependencies]
accesskit.workspace = true
anyhow.workspace = true
async-task = "4.7"
backtrace = { workspace = true, optional = true }
bitflags = { workspace = true, optional = true }
collections.workspace = true
ctor.workspace = true
derive_more.workspace = true
etagere = "0.2"
futures.workspace = true
futures-concurrency.workspace = true
gpui_macros.workspace = true
gpui_shared_string.workspace = true
http.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
proptest = { workspace = true, optional = true }
chrono.workspace = true
profiling.workspace = true
rand.workspace = true
raw-window-handle = "0.6"
regex.workspace = true
refineable.workspace = true
scheduler.workspace = true
resvg = { version = "0.45.0", default-features = false, features = [
"text",
"system-fonts",
"memmap-fonts",
"raster-images",
] }
usvg = { version = "0.45.0", default-features = false }
ttf-parser = "0.25"
schemars.workspace = true
seahash = "4.1"
serde.workspace = true
serde_json.workspace = true
slotmap.workspace = true
smallvec.workspace = true
async-channel.workspace = true
stacksafe.workspace = true
strum.workspace = true
sum_tree.workspace = true
taffy = "=0.10.1"
thiserror.workspace = true
gpui_util.workspace = true
unicode-segmentation.workspace = true
hdrhistogram = { workspace = true, optional = true }
waker-fn = "1.2.0"
lyon = "1.0"
pin-project = "1.1.10"
spin = "0.10.0"
pollster.workspace = true
url.workspace = true
uuid.workspace = true
web-time.workspace = true
[target.'cfg(target_family = "wasm")'.dependencies]
getrandom = { version = "0.3.4", features = ["wasm_js"] }
uuid = { workspace = true, features = ["js"] }
[target.'cfg(target_os = "macos")'.dependencies]
block = "0.1"
cocoa.workspace = true
cocoa-foundation.workspace = true
core-foundation.workspace = true
core-foundation-sys.workspace = true
core-graphics = "0.24"
core-video.workspace = true
core-text = "21"
font-kit = { version = "0.14.1-zed", package = "zed-font-kit", optional = true }
foreign-types = "0.5"
log.workspace = true
media.workspace = true
objc.workspace = true
objc2 = { version = "0.6", optional = true }
objc2-metal = { version = "0.3", optional = true }
mach2.workspace = true
#TODO: replace with "objc2"
metal.workspace = true
[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))'.dependencies]
pathfinder_geometry = "0.5"
[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "windows"))'.dependencies]
scap = { workspace = true, optional = true }
[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0.61", features = ["Win32_Foundation"] }
[dev-dependencies]
backtrace.workspace = true
smol.workspace = true
collections = { workspace = true, features = ["test-support"] }
env_logger.workspace = true
gpui_platform = { workspace = true, features = ["font-kit", "wayland", "x11"] }
gpui_util = { workspace = true }
lyon = { version = "1.0", features = ["extra"] }
proptest = { workspace = true }
rand.workspace = true
scheduler = { workspace = true, features = ["test-support"] }
[target.'cfg(target_family = "wasm")'.dev-dependencies]
wasm-bindgen = { workspace = true }
gpui_web.workspace = true
[build-dependencies]
embed-resource = { version = "3.0", optional = true }
[target.'cfg(target_os = "macos")'.build-dependencies]
bindgen = "0.71"
cbindgen = { version = "0.28.0", default-features = false }
# ============================================================================
# Learn Examples - Educational examples for learning GPUI
# ============================================================================
[[example]]
name = "interactive_elements"
path = "examples/learn/interactive_elements.rs"
[[example]]
name = "creating_components"
path = "examples/learn/creating_components.rs"
[[example]]
name = "layout"
path = "examples/learn/layout.rs"
[[example]]
name = "styling"
path = "examples/learn/styling.rs"
[[example]]
name = "async_tasks"
path = "examples/learn/async_tasks.rs"
[[example]]
name = "custom_drawing"
path = "examples/learn/custom_drawing.rs"
[[example]]
name = "animation"
path = "examples/learn/animation.rs"
[[example]]
name = "text"
path = "examples/learn/text.rs"
[[example]]
name = "transition"
path = "examples/learn/transition.rs"
[[example]]
name = "haptic_feedback"
path = "examples/learn/haptic_feedback.rs"
[[example]]
name = "blur"
path = "examples/learn/blur.rs"
[[example]]
name = "keyring"
path = "examples/learn/keyring.rs"
[[example]]
name = "dock_layout"
path = "examples/learn/dock_layout.rs"
[[example]]
name = "timeline"
path = "examples/learn/timeline.rs"
[[example]]
name = "node_graph"
path = "examples/learn/node_graph.rs"
[[example]]
name = "effect_stack"
path = "examples/learn/effect_stack.rs"
# ============================================================================
# Bench Examples - Performance benchmarks
# ============================================================================
[[example]]
name = "data_table"
path = "examples/bench/data_table.rs"
[[example]]
name = "paths_bench"
path = "examples/bench/paths_bench.rs"
[[example]]
name = "pattern"
path = "examples/bench/pattern.rs"
[[example]]
name = "shadow"
path = "examples/bench/shadow.rs"
# ============================================================================
# Legacy Examples - Original examples (to be updated)
# ============================================================================
[[example]]
name = "focus_visible"
path = "examples/legacy/focus_visible.rs"
[[example]]
name = "gif_viewer"
path = "examples/legacy/gif_viewer.rs"
[[example]]
name = "gradient"
path = "examples/legacy/gradient.rs"
[[example]]
name = "hello_world"
path = "examples/legacy/hello_world.rs"
[[example]]
name = "image_loading"
path = "examples/legacy/image_loading.rs"
[[example]]
name = "layer_shell"
path = "examples/legacy/layer_shell.rs"
[[example]]
name = "on_window_close_quit"
path = "examples/legacy/on_window_close_quit.rs"
[[example]]
name = "opacity"
path = "examples/legacy/opacity.rs"
[[example]]
name = "scrollable"
path = "examples/legacy/scrollable.rs"
[[example]]
name = "svg"
path = "examples/legacy/svg/svg.rs"
[[example]]
name = "tab_stop"
path = "examples/legacy/tab_stop.rs"
[[example]]
name = "tree"
path = "examples/legacy/tree.rs"
[[example]]
name = "uniform_list"
path = "examples/legacy/uniform_list.rs"
[[example]]
name = "window"
path = "examples/legacy/window.rs"
[[example]]
name = "window_positioning"
path = "examples/legacy/window_positioning.rs"
[[example]]
name = "window_shadow"
path = "examples/legacy/window_shadow.rs"