zed/crates/gpui/Cargo.toml

140 lines
3.4 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]
test-support = [
"backtrace",
"env_logger",
"collections/test-support",
"util/test-support",
]
runtime_shaders = []
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
macos-blade = ["blade-graphics", "blade-macros", "blade-rwh", "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-rwh = { workspace = true, optional = true }
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 = { version = "0.9", optional = true }
etagere = "0.2"
futures.workspace = 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
font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "5a5c4d4" }
gpui_macros.workspace = true
2021-09-14 17:48:44 +03:00
image = "0.23"
itertools.workspace = true
lazy_static.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
pathfinder_geometry = "0.5"
postage.workspace = true
profiling.workspace = true
rand.workspace = true
raw-window-handle = "0.6"
refineable.workspace = true
2021-04-06 14:44:38 +03:00
resvg = "0.14"
schemars.workspace = true
seahash = "4.1"
serde.workspace = true
serde_derive.workspace = true
serde_json.workspace = true
slotmap = "1.0.6"
smallvec.workspace = true
smol.workspace = true
sum_tree.workspace = true
taffy = { git = "https://github.com/DioxusLabs/taffy", rev = "1876f72bee5e376023eaa518aa7b8a34c769bd1b" }
2023-09-07 00:22:29 +03:00
thiserror.workspace = true
time.workspace = true
2021-04-06 14:44:38 +03:00
tiny-skia = "0.5"
usvg = { version = "0.14", features = [] }
util.workspace = true
uuid = { version = "1.1.2", features = ["v4"] }
waker-fn = "1.1.0"
2021-02-21 02:05:36 +03:00
[dev-dependencies]
backtrace = "0.3"
collections = { workspace = true, features = ["test-support"] }
env_logger.workspace = true
util = { workspace = true, features = ["test-support"] }
[build-dependencies]
bindgen = "0.65.1"
cbindgen = "0.26.0"
[target.'cfg(target_os = "macos")'.dependencies]
block = "0.1"
cocoa = "0.25"
core-foundation.workspace = 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
core-graphics = "0.23"
core-text = "20.1"
foreign-types = "0.5"
log.workspace = true
media.workspace = 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
metal = "0.25"
objc = "0.2"
[target.'cfg(any(target_os = "linux", target_os = "windows"))'.dependencies]
flume = "0.11"
#TODO: use these on all platforms
blade-graphics.workspace = true
blade-macros.workspace = true
blade-rwh.workspace = true
bytemuck = "1"
cosmic-text = "0.10.0"
copypasta = "0.10.1"
[target.'cfg(target_os = "linux")'.dependencies]
open = "5.0.1"
ashpd = "0.7.0"
xcb = { version = "1.3", features = ["as-raw-xcb-connection", "randr", "xkb"] }
wayland-client = { version = "0.31.2" }
wayland-cursor = "0.31.1"
wayland-protocols = { version = "0.31.2", features = [
"client",
"staging",
"unstable",
] }
wayland-backend = { version = "0.3.3", features = ["client_system"] }
xkbcommon = { version = "0.7", features = ["wayland", "x11"] }
as-raw-xcb-connection = "1"
calloop = "0.12.4"
calloop-wayland-source = "0.2.0"
linux: add credentials impl via oo7 (#8035) This change implements gpui's credentials API for the linux platform, using the [`oo7`](https://lib.rs/crates/oo7) library. We had a short discussion on Discord about where to store credentials and landed on the two dbus APIs [`org.freedesktop.Secrets`](https://specifications.freedesktop.org/secret-service/latest/index.html) and [`org.freedesktop.portal.Secrets`](https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Secret.html). The first one provides access to a more or less general purpose keystore, the second provides a way of obtaining a unique masterkey which in turn can be used for encrypting stuff and storing it to disk (especially interesting for sandboxed apps, think flatpak/snap). I decided to give the implementation a try with `oo7`, which uses the portal if the app is sandboxed and the secret service otherwise. If we do not want to use that library, we would probably have to more or less copy its functionality anyways. I also heard rumors of eventually changing the credentials API and I think this implementation serves as a starting point to discuss the need for this? With a working credentials implementation the sign in button now works (it panicked before). Todos: - [x] implement keystore unlocking - [x] try the change with oo7's tracing enabled? - [x] test the password deletion Release Notes: - N/A --------- Signed-off-by: Niklas Wimmer <mail@nwimmer.me> Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-03-04 00:54:06 +03:00
oo7 = "0.3.0"
[target.'cfg(windows)'.dependencies]
windows.workspace = true
[[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"