zed/crates/gpui/Cargo.toml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

185 lines
4.6 KiB
TOML
Raw Normal View History

[package]
name = "gpui"
version = "0.1.0"
edition = "2021"
authors = ["Nathan Sobo <nathan@zed.dev>"]
description = "Zed's GPU-accelerated UI framework"
publish = false
license = "Apache-2.0"
[lints]
workspace = true
[features]
default = []
test-support = [
"backtrace",
"collections/test-support",
"util/test-support",
"http_client/test-support",
]
runtime_shaders = []
macos-blade = ["blade-graphics", "blade-macros", "blade-util", "bytemuck"]
[lib]
path = "src/gpui.rs"
doctest = false
[dependencies]
anyhow.workspace = true
2024-01-04 13:39:52 +03:00
async-task = "4.7"
backtrace = { version = "0.3", optional = true }
Enable Blade on MacOS via "macos-blade" feature (#7669) Depends on https://github.com/zed-industries/font-kit/pull/2 and https://github.com/kvark/blade/pull/77 This change enables Blade to be also used on MacOS. It will also make it easier to use it on Windows. What works: most of the things. Zed loads as fast and appears equally responsive to the current renderer. <img width="306" alt="Screenshot 2024-02-11 at 12 09 15 AM" src="https://github.com/zed-industries/zed/assets/107301/66d82f45-5ea2-4e2b-86c6-5b3ed333c827"> Things missing: - [x] video streaming. ~~Requires a bit of plumbing on both Blade and Zed sides, but all fairly straightforward.~~ - verified with a local setup - [x] resize. ~~Not sure where exactly to hook up the reaction on the window size change. Once we know where, the fix is one line.~~ - [ ] fine-tune CA Layer - this isn't a blocker for merging the PR, but it would be a blocker if we wanted to switch to the new path by default - [ ] rebase on latest, get the dependency merged (need review/merge of https://github.com/zed-industries/font-kit/pull/2!) Update: I implemented resize support as well as "surface" rendering on the Blade path (which will be useful on Linux/Windows later on). I haven't tested the latter though - not sure how to get something streaming. Would appreciate some help! I don't think this should be a blocker to this PR, anyway. The only little piece that's missing for the Blade on MacOS path to be full-featured is fine-tuning the CALayer configuration. Zed does a lot of careful logic in configuring the layer, such as switching the "present with transaction" on/off intermittently, which Blade path doesn't have yet. Release Notes: - N/A --------- Co-authored-by: Mikayla <mikayla@zed.dev>
2024-02-17 00:39:40 +03:00
blade-graphics = { workspace = true, optional = true }
blade-macros = { workspace = true, optional = true }
blade-util = { workspace = true, optional = true }
Enable Blade on MacOS via "macos-blade" feature (#7669) Depends on https://github.com/zed-industries/font-kit/pull/2 and https://github.com/kvark/blade/pull/77 This change enables Blade to be also used on MacOS. It will also make it easier to use it on Windows. What works: most of the things. Zed loads as fast and appears equally responsive to the current renderer. <img width="306" alt="Screenshot 2024-02-11 at 12 09 15 AM" src="https://github.com/zed-industries/zed/assets/107301/66d82f45-5ea2-4e2b-86c6-5b3ed333c827"> Things missing: - [x] video streaming. ~~Requires a bit of plumbing on both Blade and Zed sides, but all fairly straightforward.~~ - verified with a local setup - [x] resize. ~~Not sure where exactly to hook up the reaction on the window size change. Once we know where, the fix is one line.~~ - [ ] fine-tune CA Layer - this isn't a blocker for merging the PR, but it would be a blocker if we wanted to switch to the new path by default - [ ] rebase on latest, get the dependency merged (need review/merge of https://github.com/zed-industries/font-kit/pull/2!) Update: I implemented resize support as well as "surface" rendering on the Blade path (which will be useful on Linux/Windows later on). I haven't tested the latter though - not sure how to get something streaming. Would appreciate some help! I don't think this should be a blocker to this PR, anyway. The only little piece that's missing for the Blade on MacOS path to be full-featured is fine-tuning the CALayer configuration. Zed does a lot of careful logic in configuring the layer, such as switching the "present with transaction" on/off intermittently, which Blade path doesn't have yet. Release Notes: - N/A --------- Co-authored-by: Mikayla <mikayla@zed.dev>
2024-02-17 00:39:40 +03:00
bytemuck = { version = "1", optional = true }
collections.workspace = true
ctor.workspace = true
2023-08-06 21:45:31 +03:00
derive_more.workspace = true
env_logger.workspace = true
etagere = "0.2"
futures.workspace = true
gpui_macros.workspace = true
http_client.workspace = true
image = "0.25.1"
itertools.workspace = true
linkme = "0.3"
log.workspace = true
2021-02-21 02:05:36 +03:00
num_cpus = "1.13"
parking = "2.0.0"
parking_lot.workspace = true
postage.workspace = true
profiling.workspace = true
rand.workspace = true
raw-window-handle = "0.6"
refineable.workspace = true
resvg = { version = "0.41.0", default-features = false }
usvg = { version = "0.41.0", default-features = false }
schemars.workspace = true
seahash = "4.1"
semantic_version.workspace = true
serde.workspace = true
serde_derive.workspace = true
serde_json.workspace = true
slotmap = "1.0.6"
smallvec.workspace = true
smol.workspace = true
strum.workspace = true
sum_tree.workspace = true
gpui: Bump taffy to 0.4.3 again (#11655) We reverted bump to taffy 0.4.3 following an issue spotted by @maxdeviant where chat text input was not being rendered correctly: ![image](https://github.com/zed-industries/zed/assets/24362066/9d7e6444-47b1-4ac2-808f-bf10404377c0) This was an issue with the previous attempt to upgrade to taffy 0.4.0 as well. We bail early in `compute_auto_height_layout` due to a missing width: https://github.com/zed-industries/zed/blob/df190ea84621837c44fa50c62837bdbea04b9e22/crates/editor/src/element.rs#L5266 The same issue is visible in story for auto-height editor (or rather, the breakage is visible - the editor simply does not render at all there). I tracked down the breakage to https://github.com/DioxusLabs/taffy/pull/573 ; it looks like it specifically affects editors with auto-height. In taffy <0.4 which we were using previously, we'd eventually get a proper width for auto-height EditorElement after having initially computed the size. With taffy 0.4 however (and specifically that PR mentioned earlier), we're getting `Size::NONE` in layout phase [^1]. I've noticed though that even with taffy <0.3, the `known_dimensions.width` was always equal to `available_space.width` in layout phase. Hence, I went with falling back to `available_space.width` when it is a definite value and we don't have a `known_dimensions.width`. Done this way, both chat input and auto-height story render correctly. /cc @as-cii Related: https://github.com/zed-industries/zed/pull/11606 https://github.com/zed-industries/zed/pull/11622 https://github.com/zed-industries/zed/pull/7868 https://github.com/zed-industries/zed/pull/7896 [^1]: This could possibly be related to change in what gets passed in https://github.com/DioxusLabs/taffy/pull/573/files#diff-60c916e9b0c507925f032cecdde6ae163e41b84b8e4bc0a6c04f7d846b0aad9eR133 , though I'm not sure if editor is a leaf node in this case Release Notes: - N/A
2024-05-10 16:05:50 +03:00
taffy = "0.4.3"
2023-09-07 00:22:29 +03:00
thiserror.workspace = true
time.workspace = true
util.workspace = true
uuid.workspace = true
Update Rust crate waker-fn to v1.2.0 (#15289) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [waker-fn](https://togithub.com/smol-rs/waker-fn) | dependencies | minor | `1.1.0` -> `1.2.0` | --- ### Release Notes <details> <summary>smol-rs/waker-fn (waker-fn)</summary> ### [`v1.2.0`](https://togithub.com/smol-rs/waker-fn/blob/HEAD/CHANGELOG.md#Version-120) [Compare Source](https://togithub.com/smol-rs/waker-fn/compare/v1.1.1...v1.2.0) - Add a new `portable-atomic` feature that allows for the usage of the `portable-atomic` crate to implement `waker-fn`. ([#&#8203;10](https://togithub.com/smol-rs/waker-fn/issues/10)) ### [`v1.1.1`](https://togithub.com/smol-rs/waker-fn/blob/HEAD/CHANGELOG.md#Version-111) [Compare Source](https://togithub.com/smol-rs/waker-fn/compare/v1.1.0...v1.1.1) - Reimplement using 100% safe code. ([#&#8203;7](https://togithub.com/smol-rs/waker-fn/issues/7)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone America/New_York, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- Release Notes: - N/A <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzguMCIsInVwZGF0ZWRJblZlciI6IjM3LjQzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-07-26 20:05:29 +03:00
waker-fn = "1.2.0"
2021-02-21 02:05:36 +03:00
[dev-dependencies]
backtrace = "0.3"
collections = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }
unicode-segmentation.workspace = true
[build-dependencies]
embed-resource = "2.4"
[target.'cfg(target_os = "macos")'.build-dependencies]
bindgen = "0.65.1"
cbindgen = { version = "0.26.0", default-features = false }
[target.'cfg(target_os = "macos")'.dependencies]
block = "0.1"
cocoa.workspace = true
core-foundation.workspace = true
core-foundation-sys = "0.8"
Enable Blade on MacOS via "macos-blade" feature (#7669) Depends on https://github.com/zed-industries/font-kit/pull/2 and https://github.com/kvark/blade/pull/77 This change enables Blade to be also used on MacOS. It will also make it easier to use it on Windows. What works: most of the things. Zed loads as fast and appears equally responsive to the current renderer. <img width="306" alt="Screenshot 2024-02-11 at 12 09 15 AM" src="https://github.com/zed-industries/zed/assets/107301/66d82f45-5ea2-4e2b-86c6-5b3ed333c827"> Things missing: - [x] video streaming. ~~Requires a bit of plumbing on both Blade and Zed sides, but all fairly straightforward.~~ - verified with a local setup - [x] resize. ~~Not sure where exactly to hook up the reaction on the window size change. Once we know where, the fix is one line.~~ - [ ] fine-tune CA Layer - this isn't a blocker for merging the PR, but it would be a blocker if we wanted to switch to the new path by default - [ ] rebase on latest, get the dependency merged (need review/merge of https://github.com/zed-industries/font-kit/pull/2!) Update: I implemented resize support as well as "surface" rendering on the Blade path (which will be useful on Linux/Windows later on). I haven't tested the latter though - not sure how to get something streaming. Would appreciate some help! I don't think this should be a blocker to this PR, anyway. The only little piece that's missing for the Blade on MacOS path to be full-featured is fine-tuning the CALayer configuration. Zed does a lot of careful logic in configuring the layer, such as switching the "present with transaction" on/off intermittently, which Blade path doesn't have yet. Release Notes: - N/A --------- Co-authored-by: Mikayla <mikayla@zed.dev>
2024-02-17 00:39:40 +03:00
core-graphics = "0.23"
core-text = "20.1"
font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "40391b7" }
Enable Blade on MacOS via "macos-blade" feature (#7669) Depends on https://github.com/zed-industries/font-kit/pull/2 and https://github.com/kvark/blade/pull/77 This change enables Blade to be also used on MacOS. It will also make it easier to use it on Windows. What works: most of the things. Zed loads as fast and appears equally responsive to the current renderer. <img width="306" alt="Screenshot 2024-02-11 at 12 09 15 AM" src="https://github.com/zed-industries/zed/assets/107301/66d82f45-5ea2-4e2b-86c6-5b3ed333c827"> Things missing: - [x] video streaming. ~~Requires a bit of plumbing on both Blade and Zed sides, but all fairly straightforward.~~ - verified with a local setup - [x] resize. ~~Not sure where exactly to hook up the reaction on the window size change. Once we know where, the fix is one line.~~ - [ ] fine-tune CA Layer - this isn't a blocker for merging the PR, but it would be a blocker if we wanted to switch to the new path by default - [ ] rebase on latest, get the dependency merged (need review/merge of https://github.com/zed-industries/font-kit/pull/2!) Update: I implemented resize support as well as "surface" rendering on the Blade path (which will be useful on Linux/Windows later on). I haven't tested the latter though - not sure how to get something streaming. Would appreciate some help! I don't think this should be a blocker to this PR, anyway. The only little piece that's missing for the Blade on MacOS path to be full-featured is fine-tuning the CALayer configuration. Zed does a lot of careful logic in configuring the layer, such as switching the "present with transaction" on/off intermittently, which Blade path doesn't have yet. Release Notes: - N/A --------- Co-authored-by: Mikayla <mikayla@zed.dev>
2024-02-17 00:39:40 +03:00
foreign-types = "0.5"
log.workspace = true
media.workspace = true
metal = "0.29"
objc = "0.2"
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
pathfinder_geometry = "0.5"
[target.'cfg(any(target_os = "linux", target_os = "windows"))'.dependencies]
blade-graphics.workspace = true
blade-macros.workspace = true
blade-util.workspace = true
bytemuck = "1"
[target.'cfg(target_os = "linux")'.dependencies]
as-raw-xcb-connection = "1"
ashpd.workspace = true
calloop = "0.13.0"
calloop-wayland-source = "0.3.0"
cosmic-text = { git = "https://github.com/pop-os/cosmic-text", rev = "542b20c" }
flume = "0.11"
wayland-backend = { version = "0.3.3", features = ["client_system", "dlopen"] }
wayland-client = { version = "0.31.2" }
wayland-cursor = "0.31.1"
wayland-protocols = { version = "0.31.2", features = [
"client",
"staging",
"unstable",
] }
wayland-protocols-plasma = { version = "0.2.0", features = ["client"] }
oo7 = "0.3.0"
open = "5.2.0"
filedescriptor = "0.8.2"
x11rb = { version = "0.13.0", features = [
"allow-unsafe-code",
"xkb",
"randr",
"xinput",
"cursor",
"resource_manager",
"sync",
] }
xkbcommon = { git = "https://github.com/ConradIrwin/xkbcommon-rs", rev = "fcbb4612185cc129ceeff51d22f7fb51810a03b2", features = [
"wayland",
"x11",
] }
xim = { git = "https://github.com/npmania/xim-rs", rev = "27132caffc5b9bc9c432ca4afad184ab6e7c16af", features = [
"x11rb-xcb",
"x11rb-client",
] }
font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "40391b7", features = [
"source-fontconfig-dlopen",
] }
x11-clipboard = "0.9.2"
[target.'cfg(windows)'.dependencies]
windows.workspace = true
windows-core = "0.58"
[[example]]
name = "hello_world"
path = "examples/hello_world.rs"
[[example]]
name = "image"
path = "examples/image/image.rs"
[[example]]
name = "set_menus"
path = "examples/set_menus.rs"
[[example]]
name = "window_shadow"
path = "examples/window_shadow.rs"
[[example]]
name = "input"
path = "examples/input.rs"
[[example]]
name = "shadow"
path = "examples/shadow.rs"
[[example]]
name = "text_wrapper"
path = "examples/text_wrapper.rs"