Files
oak-gpui/Cargo.toml
T
2026-03-22 12:21:07 -04:00

463 lines
12 KiB
TOML

[workspace]
members = [
".",
"tooling/macros",
]
default-members = [
".",
]
resolver = "3"
[package]
name = "gpui-ce"
version = "0.3.3"
edition = "2024"
authors = ["Nathan Sobo <nathan@zed.dev>"]
description = "A community fork of Zed's GPU-accelerated UI framework"
repository = "https://github.com/gpui-ce/gpui-ce"
publish = true
license = "Apache-2.0"
homepage = "https://gpui-ce.github.io/"
readme = "README.md"
keywords = ["desktop", "gui", "immediate"]
categories = ["gui"]
autoexamples = false
[features]
default = ["font-kit", "wayland", "x11", "windows-manifest"]
test-support = [
"leak-detection",
"backtrace",
"collections/test-support",
"util/test-support",
"http_client/test-support",
"wayland",
"x11",
]
inspector = ["gpui-ce-macros/inspector"]
leak-detection = ["backtrace"]
runtime_shaders = []
wayland = [
"bitflags",
"ashpd/wayland",
"font-kit",
"calloop-wayland-source",
"wayland-backend",
"wayland-client",
"wayland-cursor",
"wayland-protocols",
"wayland-protocols-plasma",
"wayland-protocols-wlr",
"filedescriptor",
"xkbcommon",
"open",
]
x11 = [
"ashpd",
"font-kit",
"as-raw-xcb-connection",
"x11rb",
"xkbcommon",
"xim",
"x11-clipboard",
"filedescriptor",
"open",
]
windows-manifest = []
[lib]
name = "gpui"
path = "src/gpui.rs"
doctest = false
[dependencies]
anyhow = "1.0.86"
async-task = "4.7"
backtrace = { version = "0.3", optional = true }
circular-buffer = "1.0"
collections = { package = "gpui_collections", version = "0.2.2" }
ctor = "0.4.0"
derive_more = "0.99.17"
etagere = "0.2"
futures = "0.3"
futures-concurrency = "7"
gpui-ce-macros = { path = "./tooling/macros", features = ["inspector"] }
http_client = { package = "gpui_http_client", version = "0.2.2" }
image = "0.25.1"
inventory = "0.3.19"
itertools = "0.14.0"
libc = "0.2"
log = { version = "0.4.16", features = ["kv_unstable_serde", "serde"] }
lyon = "1.0"
num_cpus = "1.13"
parking = "2.0.0"
parking_lot = "0.12.1"
pin-project = "1.1.10"
postage = { version = "0.5", features = ["futures-traits"] }
profiling = "1"
proptest = "1"
rand = "0.9"
raw-window-handle = "0.6"
refineable = { package = "gpui_refineable", version = "0.2.2" }
resvg = { version = "0.45.0", default-features = false, features = [
"text",
"system-fonts",
"memmap-fonts",
] }
schemars = { version = "1.0", features = ["indexmap2"] }
seahash = "4.1"
semver = { version = "1.0", features = ["serde"] }
serde = { version = "1.0.221", features = ["derive", "rc"] }
serde_json = { version = "1.0.144", features = ["preserve_order", "raw_value"] }
slotmap = "1.0.6"
smallvec = { version = "1.6", features = ["union"] }
smol = "2.0"
spin = "0.10.0"
stacksafe = "0.1"
strum = { version = "0.27.2", features = ["derive"] }
sum_tree = { package = "gpui_sum_tree", version = "0.2.2" }
taffy = "=0.9.0"
thiserror = "2.0.12"
util = { package = "gpui_util", version = "0.2.2" }
util_macros = { package = "gpui_util_macros", version = "0.2.2" }
usvg = { version = "0.45.0", default-features = false }
url = "2"
uuid = { version = "1.1.2", features = ["v4", "v5", "v7", "serde"] }
waker-fn = "1.2.0"
web-time = "1"
async-channel = "2"
pollster = "0.4"
chrono = "0.4"
[target.'cfg(target_os = "macos")'.dependencies]
block = "0.1"
cocoa = "=0.26.0"
cocoa-foundation = "=0.2.0"
core-foundation = "=0.10.0"
core-foundation-sys = "0.8.6"
core-graphics = "0.24"
core-text = "21"
core-video = { version = "0.4.3", features = ["metal"] }
dispatch2 = "0.3.1"
flume = "0.11"
font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "110523127440aefb11ce0cf280ae7c5071337ec5", package = "zed-font-kit", version = "0.14.1-zed", optional = true }
foreign-types = "0.5"
mach2 = "0.5"
metal = "0.29"
objc = "0.2"
objc2 = { version = "0.6", optional = true }
objc2-metal = { version = "0.3", optional = 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"))'.dependencies]
flume = "0.11"
oo7 = { version = "0.6", default-features = false, features = [
"async-std",
"native_crypto",
] }
wgpu = "24"
cosmic-text = "0.17.0"
swash = "0.2.6"
bytemuck = "1"
ashpd = { version = "0.11", default-features = false, features = ["async-std"], optional = true }
font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "110523127440aefb11ce0cf280ae7c5071337ec5", package = "zed-font-kit", version = "0.14.1-zed", features = [
"source-fontconfig-dlopen",
], optional = true }
calloop = "0.14.3"
filedescriptor = { version = "0.8.2", optional = true }
open = { version = "5.2.0", optional = true }
calloop-wayland-source = { version = "0.4.1", optional = true }
wayland-backend = { version = "0.3.3", features = [
"client_system",
"dlopen",
], 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 }
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 }
xkbcommon = { version = "0.8.0", features = [
"wayland",
"x11",
], optional = true }
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 }
x11-clipboard = { version = "0.9.3", optional = true }
bitflags = { version = "2.6.0", optional = true }
[target.'cfg(target_os = "windows")'.dependencies]
flume = "0.11"
rand = "0.9"
windows = { version = "0.61", features = [
"Foundation_Numerics",
"Storage_Search",
"Storage_Streams",
"System_Threading",
"UI_ViewManagement",
"Wdk_System_SystemServices",
"Win32_Globalization",
"Win32_Graphics_Direct3D",
"Win32_Graphics_Direct3D11",
"Win32_Graphics_Direct3D_Fxc",
"Win32_Graphics_DirectComposition",
"Win32_Graphics_DirectWrite",
"Win32_Graphics_Dwm",
"Win32_Graphics_Dxgi",
"Win32_Graphics_Dxgi_Common",
"Win32_Graphics_Gdi",
"Win32_Graphics_Imaging",
"Win32_Graphics_Hlsl",
"Win32_Networking_WinSock",
"Win32_Security",
"Win32_Security_Credentials",
"Win32_Security_Cryptography",
"Win32_Storage_FileSystem",
"Win32_System_Com",
"Win32_System_Com_StructuredStorage",
"Win32_System_Console",
"Win32_System_DataExchange",
"Win32_System_IO",
"Win32_System_LibraryLoader",
"Win32_System_Memory",
"Win32_System_Ole",
"Win32_System_Performance",
"Win32_System_Pipes",
"Win32_System_SystemInformation",
"Win32_System_SystemServices",
"Win32_System_Threading",
"Win32_System_Variant",
"Win32_System_WinRT",
"Win32_UI_Controls",
"Win32_UI_HiDpi",
"Win32_UI_Input_Ime",
"Win32_UI_Input_KeyboardAndMouse",
"Win32_UI_Shell",
"Win32_UI_Shell_Common",
"Win32_UI_Shell_PropertiesSystem",
"Win32_UI_WindowsAndMessaging",
] }
windows-core = "0.61"
windows-numerics = "0.2"
windows-registry = "0.5"
[dev-dependencies]
backtrace = "0.3"
collections = { package = "gpui_collections", version = "0.2.2", features = ["test-support"] }
env_logger = "0.11"
http_client = { package = "gpui_http_client", version = "0.2.2", features = ["test-support"] }
lyon = { version = "1.0", features = ["extra"] }
pretty_assertions = { version = "1.3.0", features = ["unstable"] }
proptest = "1"
rand = "0.9"
unicode-segmentation = "1.10"
util = { package = "gpui_util", version = "0.2.2", features = ["test-support"] }
[target.'cfg(target_os = "windows")'.build-dependencies]
embed-resource = "3.0"
windows-registry = "0.5"
[target.'cfg(target_os = "macos")'.build-dependencies]
cbindgen = { version = "0.28.0", default-features = false }
[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.build-dependencies]
naga = { version = "29.0", features = ["wgsl-in"] }
# ============================================================================
# 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"
# ============================================================================
# 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 = "input"
path = "examples/legacy/input.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"
[profile.dev]
split-debuginfo = "unpacked"
incremental = false
codegen-units = 16
[profile.dev.build-override]
codegen-units = 16
[profile.dev.package]
quote = { opt-level = 3 }
syn = { opt-level = 3 }
proc-macro2 = { opt-level = 3 }
taffy = { opt-level = 3 }
resvg = { opt-level = 3 }
[profile.release]
debug = "limited"
lto = "thin"
codegen-units = 1
[profile.release-fast]
inherits = "release"
debug = "full"
lto = false
codegen-units = 16
[lints.rust]
unexpected_cfgs = { level = "allow" }
[lints.clippy]
dbg_macro = "deny"
todo = "deny"
declare_interior_mutable_const = "deny"
redundant_clone = "deny"
disallowed_methods = "deny"
style = { level = "allow", priority = -1 }
type_complexity = "allow"
let_underscore_future = "allow"
single_range_in_vec_init = "allow"
too_many_arguments = "allow"
large_enum_variant = "allow"
nonminimal_bool = "allow"