diff --git a/.cargo/ci-config.toml b/.cargo/ci-config.toml
index b31b79a59b..7a740adfd7 100644
--- a/.cargo/ci-config.toml
+++ b/.cargo/ci-config.toml
@@ -14,15 +14,3 @@ rustflags = ["-D", "warnings"]
# We don't need fullest debug information for dev stuff (tests etc.) in CI.
[profile.dev]
debug = "limited"
-
-# Use Mold on Linux, because it's faster than GNU ld and LLD.
-#
-# We no longer set this in the default `config.toml` so that developers can opt in to Wild, which
-# is faster than Mold, in their own ~/.cargo/config.toml.
-[target.x86_64-unknown-linux-gnu]
-linker = "clang"
-rustflags = ["-C", "link-arg=-fuse-ld=mold"]
-
-[target.aarch64-unknown-linux-gnu]
-linker = "clang"
-rustflags = ["-C", "link-arg=-fuse-ld=mold"]
diff --git a/.cargo/config.toml b/.cargo/config.toml
index 9b2e6f51c9..a9bf1f9cc9 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -16,5 +16,9 @@ rustflags = [
"target-feature=+crt-static", # This fixes the linking issue when compiling livekit on Windows
]
+# We need lld to link libwebrtc.a successfully on aarch64-linux
+[target.aarch64-unknown-linux-gnu]
+rustflags = ["-C", "link-arg=-fuse-ld=lld"]
+
[env]
MACOSX_DEPLOYMENT_TARGET = "10.15.7"
diff --git a/.claude/settings.local.json b/.claude/settings.local.json
deleted file mode 100644
index 2641db6183..0000000000
--- a/.claude/settings.local.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "permissions": {
- "allow": [
- "Bash(cargo build:*)"
- ]
- }
-}
diff --git a/.config/nextest.toml b/.config/nextest.toml
deleted file mode 100644
index e8fa9bdf9d..0000000000
--- a/.config/nextest.toml
+++ /dev/null
@@ -1,5 +0,0 @@
-# Nextest configuration for GPUI
-# https://nexte.st/book/configuration.html
-
-[profile.default]
-# Default test settings
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index d3157ef5a5..3a74e1b6b7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,12 +1,13 @@
-# Build artifacts
+# Build Artifacts
**/target
**/cargo-target
*.wasm
-# IDE and editor
+# IDE and Editor
.DS_Store
.idea
.vscode
+.zed
*.xcodeproj
*.xcworkspace
DerivedData/
@@ -23,11 +24,14 @@ xcuserdata/
.envrc
/result
-# Environment and secrets
+# Environment and Secrets
.env
.env.secret.toml
.netrc
+# Version Control
+.git
+
# Misc
**/*.db
.build
diff --git a/.zed/settings.json b/.zed/settings.json
deleted file mode 100644
index 4f7a5a6245..0000000000
--- a/.zed/settings.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "languages": {
- "Markdown": {
- "tab_size": 2,
- },
- "TOML": {
- "format_on_save": "off",
- },
- "YAML": {
- "tab_size": 2,
- },
- "JSON": {
- "tab_size": 2,
- "preferred_line_length": 120,
- },
- "JSONC": {
- "tab_size": 2,
- "preferred_line_length": 120,
- },
- },
- "hard_tabs": false,
- "formatter": "auto",
- "remove_trailing_whitespace_on_save": true,
- "ensure_final_newline_on_save": true,
- "file_scan_exclusions": [
- "**/.git",
- "**/.svn",
- "**/.hg",
- "**/.jj",
- "**/CVS",
- "**/.DS_Store",
- "**/Thumbs.db",
- "**/target",
- ],
-}
diff --git a/.zed/tasks.json b/.zed/tasks.json
deleted file mode 100644
index 57f6b28e12..0000000000
--- a/.zed/tasks.json
+++ /dev/null
@@ -1,23 +0,0 @@
-[
- {
- "label": "clippy",
- "command": "./script/clippy",
- "args": [],
- "allow_concurrent_runs": true,
- "use_new_terminal": false,
- },
- {
- "label": "cargo check gpui",
- "command": "cargo",
- "args": ["check", "--package", "gpui"],
- "allow_concurrent_runs": true,
- "use_new_terminal": false,
- },
- {
- "label": "cargo test gpui",
- "command": "cargo",
- "args": ["test", "--package", "gpui"],
- "allow_concurrent_runs": false,
- "use_new_terminal": false,
- },
-]
diff --git a/Cargo.lock b/Cargo.lock
index 0096b90e01..969297fc04 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -33,6 +33,18 @@ version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
+[[package]]
+name = "aes"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
+dependencies = [
+ "cfg-if",
+ "cipher",
+ "cpufeatures 0.2.17",
+ "zeroize",
+]
+
[[package]]
name = "ahash"
version = "0.8.12"
@@ -233,6 +245,31 @@ dependencies = [
"libloading",
]
+[[package]]
+name = "ashpd"
+version = "0.13.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13bdf0fd848239dcd5e64eeeee35dbc00378ebcc6f3aa4ead0a305eec83d0cfb"
+dependencies = [
+ "enumflags2",
+ "futures-util",
+ "getrandom 0.4.1",
+ "serde",
+ "zbus",
+]
+
+[[package]]
+name = "async-broadcast"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532"
+dependencies = [
+ "event-listener 5.4.1",
+ "event-listener-strategy",
+ "futures-core",
+ "pin-project-lite",
+]
+
[[package]]
name = "async-channel"
version = "1.9.0"
@@ -366,6 +403,17 @@ dependencies = [
"rustix 1.1.4",
]
+[[package]]
+name = "async-recursion"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "async-signal"
version = "0.2.13"
@@ -417,6 +465,17 @@ version = "4.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
+[[package]]
+name = "async-trait"
+version = "0.1.89"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "async_zip"
version = "0.0.17"
@@ -569,13 +628,31 @@ dependencies = [
"generic-array",
]
+[[package]]
+name = "block-padding"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93"
+dependencies = [
+ "generic-array",
+]
+
[[package]]
name = "block2"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f"
dependencies = [
- "objc2",
+ "objc2 0.5.2",
+]
+
+[[package]]
+name = "block2"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5"
+dependencies = [
+ "objc2 0.6.4",
]
[[package]]
@@ -677,6 +754,15 @@ dependencies = [
"wayland-client",
]
+[[package]]
+name = "cbc"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6"
+dependencies = [
+ "cipher",
+]
+
[[package]]
name = "cc"
version = "1.2.56"
@@ -707,6 +793,15 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
+[[package]]
+name = "cgl"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "chacha20"
version = "0.10.0"
@@ -718,12 +813,66 @@ dependencies = [
"rand_core 0.10.0",
]
+[[package]]
+name = "chrono"
+version = "0.4.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0"
+dependencies = [
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "wasm-bindgen",
+ "windows-link 0.2.1",
+]
+
+[[package]]
+name = "cipher"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
+dependencies = [
+ "crypto-common",
+ "inout",
+ "zeroize",
+]
+
[[package]]
name = "circular-buffer"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14c638459986b83c2b885179bd4ea6a2cbb05697b001501a56adb3a3d230803b"
+[[package]]
+name = "cocoa"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2"
+dependencies = [
+ "bitflags 2.11.0",
+ "block",
+ "cocoa-foundation",
+ "core-foundation 0.10.0",
+ "core-graphics 0.24.0",
+ "foreign-types",
+ "libc",
+ "objc",
+]
+
+[[package]]
+name = "cocoa-foundation"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d"
+dependencies = [
+ "bitflags 2.11.0",
+ "block",
+ "core-foundation 0.10.0",
+ "core-graphics-types 0.2.0",
+ "libc",
+ "objc",
+]
+
[[package]]
name = "codespan-reporting"
version = "0.12.0"
@@ -821,9 +970,9 @@ dependencies = [
[[package]]
name = "core-foundation"
-version = "0.10.1"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6"
+checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63"
dependencies = [
"core-foundation-sys",
"libc",
@@ -848,6 +997,19 @@ dependencies = [
"libc",
]
+[[package]]
+name = "core-graphics"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1"
+dependencies = [
+ "bitflags 2.11.0",
+ "core-foundation 0.10.0",
+ "core-graphics-types 0.2.0",
+ "foreign-types",
+ "libc",
+]
+
[[package]]
name = "core-graphics-types"
version = "0.1.3"
@@ -866,7 +1028,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb"
dependencies = [
"bitflags 2.11.0",
- "core-foundation 0.10.1",
+ "core-foundation 0.10.0",
+ "libc",
+]
+
+[[package]]
+name = "core-graphics2"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e4583956b9806b69f73fcb23aee05eb3620efc282972f08f6a6db7504f8334d"
+dependencies = [
+ "bitflags 2.11.0",
+ "block",
+ "cfg-if",
+ "core-foundation 0.10.0",
"libc",
]
@@ -877,11 +1052,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9d2790b5c08465d49f8dc05c8bcae9fea467855947db39b0f8145c091aaced5"
dependencies = [
"core-foundation 0.9.4",
- "core-graphics",
+ "core-graphics 0.23.2",
"foreign-types",
"libc",
]
+[[package]]
+name = "core-text"
+version = "21.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a593227b66cbd4007b2a050dfdd9e1d1318311409c8d600dc82ba1b15ca9c130"
+dependencies = [
+ "core-foundation 0.10.0",
+ "core-graphics 0.24.0",
+ "foreign-types",
+ "libc",
+]
+
+[[package]]
+name = "core-video"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d45e71d5be22206bed53c3c3cb99315fc4c3d31b8963808c6bc4538168c4f8ef"
+dependencies = [
+ "block",
+ "core-foundation 0.10.0",
+ "core-graphics2",
+ "io-surface",
+ "libc",
+ "metal 0.29.0",
+]
+
[[package]]
name = "core2"
version = "0.4.0"
@@ -1085,6 +1286,7 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer",
"crypto-common",
+ "subtle",
]
[[package]]
@@ -1134,6 +1336,18 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"
+[[package]]
+name = "dispatch2"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38"
+dependencies = [
+ "bitflags 2.11.0",
+ "block2 0.6.2",
+ "libc",
+ "objc2 0.6.4",
+]
+
[[package]]
name = "displaydoc"
version = "0.2.5"
@@ -1229,6 +1443,33 @@ dependencies = [
"cfg-if",
]
+[[package]]
+name = "endi"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099"
+
+[[package]]
+name = "enumflags2"
+version = "0.7.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef"
+dependencies = [
+ "enumflags2_derive",
+ "serde",
+]
+
+[[package]]
+name = "enumflags2_derive"
+version = "0.7.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "env_filter"
version = "1.0.0"
@@ -1424,6 +1665,12 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
+[[package]]
+name = "fixedbitset"
+version = "0.5.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99"
+
[[package]]
name = "flate2"
version = "1.1.9"
@@ -1491,8 +1738,8 @@ dependencies = [
"bitflags 2.11.0",
"byteorder",
"core-foundation 0.9.4",
- "core-graphics",
- "core-text",
+ "core-graphics 0.23.2",
+ "core-text 20.1.0",
"dirs 6.0.0",
"dwrote",
"float-ord",
@@ -1630,6 +1877,19 @@ dependencies = [
"futures-sink",
]
+[[package]]
+name = "futures-concurrency"
+version = "7.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "175cd8cca9e1d45b87f18ffa75088f2099e3c4fe5e2f83e42de112560bea8ea6"
+dependencies = [
+ "fixedbitset",
+ "futures-core",
+ "futures-lite 2.6.1",
+ "pin-project",
+ "smallvec",
+]
+
[[package]]
name = "futures-core"
version = "0.3.32"
@@ -1907,19 +2167,32 @@ name = "gpui-ce"
version = "0.3.3"
dependencies = [
"anyhow",
+ "async-channel 2.5.0",
"async-task",
"backtrace",
+ "block",
"bytemuck",
+ "chrono",
"circular-buffer",
+ "cocoa",
+ "cocoa-foundation",
+ "core-foundation 0.10.0",
+ "core-foundation-sys",
+ "core-graphics 0.24.0",
+ "core-text 21.0.0",
+ "core-video",
"cosmic-text",
"ctor",
"derive_more 2.1.1",
+ "dispatch2",
"env_logger",
"etagere",
"flume",
"font-kit",
+ "foreign-types",
"futures",
- "gpui-macros",
+ "futures-concurrency",
+ "gpui-ce-macros",
"gpui_collections",
"gpui_http_client",
"gpui_refineable",
@@ -1932,7 +2205,13 @@ dependencies = [
"libc",
"log",
"lyon",
+ "mach2",
+ "metal 0.29.0",
"num_cpus",
+ "objc",
+ "objc2 0.6.4",
+ "objc2-metal 0.3.2",
+ "oo7",
"parking",
"parking_lot",
"pathfinder_geometry",
@@ -1942,6 +2221,7 @@ dependencies = [
"pretty_assertions",
"priority-threadpool",
"profiling",
+ "proptest",
"rand 0.10.0",
"raw-window-handle",
"resvg",
@@ -1956,22 +2236,26 @@ dependencies = [
"spin 0.10.0",
"stacksafe",
"strum",
+ "swash",
"taffy",
"thiserror 2.0.18",
"unicode-segmentation",
"usvg",
"uuid",
"waker-fn",
+ "web-time",
"wgpu",
+ "windows-core 0.61.2",
+ "windows-numerics 0.2.0",
+ "windows-registry 0.5.3",
"winit",
]
[[package]]
-name = "gpui-macros"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bcb02dd63a2859714ac7b6b476937617c3c744157af1b49f7c904023a79039be"
+name = "gpui-ce-macros"
+version = "0.1.0"
dependencies = [
+ "gpui-ce",
"heck",
"proc-macro2",
"quote",
@@ -2188,12 +2472,36 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
+[[package]]
+name = "hex"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
+
[[package]]
name = "hexf-parse"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df"
+[[package]]
+name = "hkdf"
+version = "0.12.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7"
+dependencies = [
+ "hmac",
+]
+
+[[package]]
+name = "hmac"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
+dependencies = [
+ "digest",
+]
+
[[package]]
name = "home"
version = "0.5.12"
@@ -2301,6 +2609,30 @@ dependencies = [
"tracing",
]
+[[package]]
+name = "iana-time-zone"
+version = "0.1.65"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "log",
+ "wasm-bindgen",
+ "windows-core 0.62.2",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
[[package]]
name = "icu_collections"
version = "2.1.1"
@@ -2440,7 +2772,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3"
dependencies = [
"byteorder-lite",
- "quick-error",
+ "quick-error 2.0.1",
]
[[package]]
@@ -2467,6 +2799,16 @@ dependencies = [
"serde_core",
]
+[[package]]
+name = "inout"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"
+dependencies = [
+ "block-padding",
+ "generic-array",
+]
+
[[package]]
name = "instant"
version = "0.1.13"
@@ -2496,6 +2838,18 @@ dependencies = [
"rustversion",
]
+[[package]]
+name = "io-surface"
+version = "0.16.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "554b8c5d64ec09a3a520fe58e4d48a73e00ff32899cdcbe32a4877afd4968b8e"
+dependencies = [
+ "cgl",
+ "core-foundation 0.10.0",
+ "core-foundation-sys",
+ "leaky-cow",
+]
+
[[package]]
name = "ipnet"
version = "2.11.0"
@@ -2632,6 +2986,21 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+[[package]]
+name = "leak"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd100e01f1154f2908dfa7d02219aeab25d0b9c7fa955164192e3245255a0c73"
+
+[[package]]
+name = "leaky-cow"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40a8225d44241fd324a8af2806ba635fc7c8a7e9a7de4d5cf3ef54e71f5926fc"
+dependencies = [
+ "leak",
+]
+
[[package]]
name = "leb128fmt"
version = "0.1.0"
@@ -2852,6 +3221,15 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
+[[package]]
+name = "mach2"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a1b95cd5421ec55b445b5ae102f5ea0e768de1f82bd3001e11f426c269c3aea"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "malloc_buf"
version = "0.0.6"
@@ -2871,6 +3249,16 @@ dependencies = [
"rayon",
]
+[[package]]
+name = "md-5"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"
+dependencies = [
+ "cfg-if",
+ "digest",
+]
+
[[package]]
name = "memchr"
version = "2.8.0"
@@ -2886,6 +3274,30 @@ dependencies = [
"libc",
]
+[[package]]
+name = "memoffset"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "metal"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21"
+dependencies = [
+ "bitflags 2.11.0",
+ "block",
+ "core-graphics-types 0.1.3",
+ "foreign-types",
+ "log",
+ "objc",
+ "paste",
+]
+
[[package]]
name = "metal"
version = "0.33.0"
@@ -3049,6 +3461,20 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
+[[package]]
+name = "num"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23"
+dependencies = [
+ "num-bigint",
+ "num-complex",
+ "num-integer",
+ "num-iter",
+ "num-rational",
+ "num-traits",
+]
+
[[package]]
name = "num-bigint"
version = "0.4.6"
@@ -3059,6 +3485,32 @@ dependencies = [
"num-traits",
]
+[[package]]
+name = "num-bigint-dig"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7f9a86e097b0d187ad0e65667c2f58b9254671e86e7dbb78036b16692eae099"
+dependencies = [
+ "libm",
+ "num-integer",
+ "num-iter",
+ "num-traits",
+ "once_cell",
+ "rand 0.9.2",
+ "serde",
+ "smallvec",
+ "zeroize",
+]
+
+[[package]]
+name = "num-complex"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
+dependencies = [
+ "num-traits",
+]
+
[[package]]
name = "num-derive"
version = "0.4.2"
@@ -3079,6 +3531,17 @@ dependencies = [
"num-traits",
]
+[[package]]
+name = "num-iter"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
[[package]]
name = "num-rational"
version = "0.4.2"
@@ -3157,6 +3620,15 @@ dependencies = [
"objc2-encode",
]
+[[package]]
+name = "objc2"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f"
+dependencies = [
+ "objc2-encode",
+]
+
[[package]]
name = "objc2-app-kit"
version = "0.2.2"
@@ -3164,12 +3636,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff"
dependencies = [
"bitflags 2.11.0",
- "block2",
+ "block2 0.5.1",
"libc",
- "objc2",
+ "objc2 0.5.2",
"objc2-core-data",
"objc2-core-image",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
"objc2-quartz-core",
]
@@ -3180,10 +3652,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009"
dependencies = [
"bitflags 2.11.0",
- "block2",
- "objc2",
+ "block2 0.5.1",
+ "objc2 0.5.2",
"objc2-core-location",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -3192,9 +3664,9 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889"
dependencies = [
- "block2",
- "objc2",
- "objc2-foundation",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -3204,9 +3676,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef"
dependencies = [
"bitflags 2.11.0",
- "block2",
- "objc2",
- "objc2-foundation",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
+]
+
+[[package]]
+name = "objc2-core-foundation"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536"
+dependencies = [
+ "bitflags 2.11.0",
+ "dispatch2",
+ "objc2 0.6.4",
]
[[package]]
@@ -3215,10 +3698,10 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80"
dependencies = [
- "block2",
- "objc2",
- "objc2-foundation",
- "objc2-metal",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
+ "objc2-metal 0.2.2",
]
[[package]]
@@ -3227,10 +3710,10 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781"
dependencies = [
- "block2",
- "objc2",
+ "block2 0.5.1",
+ "objc2 0.5.2",
"objc2-contacts",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -3246,10 +3729,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8"
dependencies = [
"bitflags 2.11.0",
- "block2",
+ "block2 0.5.1",
"dispatch",
"libc",
- "objc2",
+ "objc2 0.5.2",
+]
+
+[[package]]
+name = "objc2-foundation"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272"
+dependencies = [
+ "bitflags 2.11.0",
+ "objc2 0.6.4",
]
[[package]]
@@ -3258,10 +3751,10 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398"
dependencies = [
- "block2",
- "objc2",
+ "block2 0.5.1",
+ "objc2 0.5.2",
"objc2-app-kit",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -3271,9 +3764,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6"
dependencies = [
"bitflags 2.11.0",
- "block2",
- "objc2",
- "objc2-foundation",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
+]
+
+[[package]]
+name = "objc2-metal"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794"
+dependencies = [
+ "bitflags 2.11.0",
+ "block2 0.6.2",
+ "dispatch2",
+ "objc2 0.6.4",
+ "objc2-core-foundation",
+ "objc2-foundation 0.3.2",
]
[[package]]
@@ -3283,10 +3790,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a"
dependencies = [
"bitflags 2.11.0",
- "block2",
- "objc2",
- "objc2-foundation",
- "objc2-metal",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
+ "objc2-metal 0.2.2",
]
[[package]]
@@ -3295,8 +3802,8 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc"
dependencies = [
- "objc2",
- "objc2-foundation",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -3306,13 +3813,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f"
dependencies = [
"bitflags 2.11.0",
- "block2",
- "objc2",
+ "block2 0.5.1",
+ "objc2 0.5.2",
"objc2-cloud-kit",
"objc2-core-data",
"objc2-core-image",
"objc2-core-location",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
"objc2-link-presentation",
"objc2-quartz-core",
"objc2-symbols",
@@ -3326,9 +3833,9 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe"
dependencies = [
- "block2",
- "objc2",
- "objc2-foundation",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -3338,10 +3845,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3"
dependencies = [
"bitflags 2.11.0",
- "block2",
- "objc2",
+ "block2 0.5.1",
+ "objc2 0.5.2",
"objc2-core-location",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
]
[[package]]
@@ -3365,6 +3872,41 @@ version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
+[[package]]
+name = "oo7"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78f2bfed90f1618b4b48dcad9307f25e14ae894e2949642c87c351601d62cebd"
+dependencies = [
+ "aes",
+ "ashpd",
+ "async-fs",
+ "async-io",
+ "async-lock",
+ "blocking",
+ "cbc",
+ "cipher",
+ "digest",
+ "endi",
+ "futures-lite 2.6.1",
+ "futures-util",
+ "getrandom 0.4.1",
+ "hkdf",
+ "hmac",
+ "md-5",
+ "num",
+ "num-bigint-dig",
+ "pbkdf2",
+ "serde",
+ "serde_bytes",
+ "sha2",
+ "subtle",
+ "zbus",
+ "zbus_macros",
+ "zeroize",
+ "zvariant",
+]
+
[[package]]
name = "openssl-probe"
version = "0.2.1"
@@ -3396,6 +3938,16 @@ dependencies = [
"num-traits",
]
+[[package]]
+name = "ordered-stream"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50"
+dependencies = [
+ "futures-core",
+ "pin-project-lite",
+]
+
[[package]]
name = "owned-alloc"
version = "0.2.0"
@@ -3471,6 +4023,16 @@ dependencies = [
"rustc_version",
]
+[[package]]
+name = "pbkdf2"
+version = "0.12.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
+dependencies = [
+ "digest",
+ "hmac",
+]
+
[[package]]
name = "percent-encoding"
version = "2.3.2"
@@ -3715,6 +4277,25 @@ dependencies = [
"syn",
]
+[[package]]
+name = "proptest"
+version = "1.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b45fcc2344c680f5025fe57779faef368840d0bd1f42f216291f0dc4ace4744"
+dependencies = [
+ "bit-set",
+ "bit-vec",
+ "bitflags 2.11.0",
+ "num-traits",
+ "rand 0.9.2",
+ "rand_chacha",
+ "rand_xorshift",
+ "regex-syntax",
+ "rusty-fork",
+ "tempfile",
+ "unarray",
+]
+
[[package]]
name = "psm"
version = "0.1.30"
@@ -3743,6 +4324,12 @@ dependencies = [
"bytemuck",
]
+[[package]]
+name = "quick-error"
+version = "1.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
+
[[package]]
name = "quick-error"
version = "2.0.1"
@@ -3815,9 +4402,9 @@ dependencies = [
[[package]]
name = "quote"
-version = "1.0.44"
+version = "1.0.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
+checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
dependencies = [
"proc-macro2",
]
@@ -3874,6 +4461,15 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c8d0fd677905edcbeedbf2edb6494d676f0e98d54d5cf9bda0b061cb8fb8aba"
+[[package]]
+name = "rand_xorshift"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a"
+dependencies = [
+ "rand_core 0.9.5",
+]
+
[[package]]
name = "range-alloc"
version = "0.1.5"
@@ -3930,7 +4526,7 @@ dependencies = [
"avif-serialize",
"imgref",
"loop9",
- "quick-error",
+ "quick-error 2.0.1",
"rav1e",
"rayon",
"rgb",
@@ -4298,6 +4894,18 @@ version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
+[[package]]
+name = "rusty-fork"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc6bf79ff24e648f6da1f8d1f011e9cac26491b619e6b9280f2b47f1774e6ee2"
+dependencies = [
+ "fnv",
+ "quick-error 1.2.3",
+ "tempfile",
+ "wait-timeout",
+]
+
[[package]]
name = "rustybuzz"
version = "0.20.1"
@@ -4404,7 +5012,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d"
dependencies = [
"bitflags 2.11.0",
- "core-foundation 0.10.1",
+ "core-foundation 0.10.0",
"core-foundation-sys",
"libc",
"security-framework-sys",
@@ -4446,6 +5054,16 @@ dependencies = [
"serde_derive",
]
+[[package]]
+name = "serde_bytes"
+version = "0.11.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8"
+dependencies = [
+ "serde",
+ "serde_core",
+]
+
[[package]]
name = "serde_core"
version = "1.0.228"
@@ -4513,6 +5131,17 @@ dependencies = [
"serde",
]
+[[package]]
+name = "serde_repr"
+version = "0.1.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "serde_urlencoded"
version = "0.7.1"
@@ -5071,7 +5700,7 @@ dependencies = [
"fax",
"flate2",
"half",
- "quick-error",
+ "quick-error 2.0.1",
"weezl",
"zune-jpeg 0.4.21",
]
@@ -5265,9 +5894,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
dependencies = [
"pin-project-lite",
+ "tracing-attributes",
"tracing-core",
]
+[[package]]
+name = "tracing-attributes"
+version = "0.1.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "tracing-core"
version = "0.1.36"
@@ -5304,6 +5945,23 @@ version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
+[[package]]
+name = "uds_windows"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e"
+dependencies = [
+ "memoffset",
+ "tempfile",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "unarray"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94"
+
[[package]]
name = "unicase"
version = "2.9.0"
@@ -5512,6 +6170,15 @@ version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+[[package]]
+name = "wait-timeout"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "waker-fn"
version = "1.2.0"
@@ -5917,7 +6584,7 @@ dependencies = [
"libc",
"libloading",
"log",
- "metal",
+ "metal 0.33.0",
"naga",
"ndk-sys",
"objc",
@@ -5936,7 +6603,7 @@ dependencies = [
"web-sys",
"wgpu-types",
"windows",
- "windows-core",
+ "windows-core 0.62.2",
]
[[package]]
@@ -6002,9 +6669,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"
dependencies = [
"windows-collections",
- "windows-core",
+ "windows-core 0.62.2",
"windows-future",
- "windows-numerics",
+ "windows-numerics 0.3.1",
]
[[package]]
@@ -6013,7 +6680,20 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"
dependencies = [
- "windows-core",
+ "windows-core 0.62.2",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.61.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
+dependencies = [
+ "windows-implement",
+ "windows-interface",
+ "windows-link 0.1.3",
+ "windows-result 0.3.4",
+ "windows-strings 0.4.2",
]
[[package]]
@@ -6035,7 +6715,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"
dependencies = [
- "windows-core",
+ "windows-core 0.62.2",
"windows-link 0.2.1",
"windows-threading",
]
@@ -6074,13 +6754,23 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
+[[package]]
+name = "windows-numerics"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
+dependencies = [
+ "windows-core 0.61.2",
+ "windows-link 0.1.3",
+]
+
[[package]]
name = "windows-numerics"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"
dependencies = [
- "windows-core",
+ "windows-core 0.62.2",
"windows-link 0.2.1",
]
@@ -6095,6 +6785,17 @@ dependencies = [
"windows-targets 0.53.5",
]
+[[package]]
+name = "windows-registry"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e"
+dependencies = [
+ "windows-link 0.1.3",
+ "windows-result 0.3.4",
+ "windows-strings 0.4.2",
+]
+
[[package]]
name = "windows-result"
version = "0.3.4"
@@ -6122,6 +6823,15 @@ dependencies = [
"windows-link 0.1.3",
]
+[[package]]
+name = "windows-strings"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
+dependencies = [
+ "windows-link 0.1.3",
+]
+
[[package]]
name = "windows-strings"
version = "0.5.1"
@@ -6381,22 +7091,22 @@ dependencies = [
"android-activity",
"atomic-waker",
"bitflags 2.11.0",
- "block2",
+ "block2 0.5.1",
"bytemuck",
"calloop",
"cfg_aliases",
"concurrent-queue",
"core-foundation 0.9.4",
- "core-graphics",
+ "core-graphics 0.23.2",
"cursor-icon",
"dpi",
"js-sys",
"libc",
"memmap2",
"ndk",
- "objc2",
+ "objc2 0.5.2",
"objc2-app-kit",
- "objc2-foundation",
+ "objc2-foundation 0.2.2",
"objc2-ui-kit",
"orbclient",
"percent-encoding",
@@ -6671,6 +7381,67 @@ dependencies = [
"synstructure",
]
+[[package]]
+name = "zbus"
+version = "5.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca82f95dbd3943a40a53cfded6c2d0a2ca26192011846a1810c4256ef92c60bc"
+dependencies = [
+ "async-broadcast",
+ "async-executor",
+ "async-io",
+ "async-lock",
+ "async-process",
+ "async-recursion",
+ "async-task",
+ "async-trait",
+ "blocking",
+ "enumflags2",
+ "event-listener 5.4.1",
+ "futures-core",
+ "futures-lite 2.6.1",
+ "hex",
+ "libc",
+ "ordered-stream",
+ "rustix 1.1.4",
+ "serde",
+ "serde_repr",
+ "tracing",
+ "uds_windows",
+ "uuid",
+ "windows-sys 0.61.2",
+ "winnow",
+ "zbus_macros",
+ "zbus_names",
+ "zvariant",
+]
+
+[[package]]
+name = "zbus_macros"
+version = "5.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "897e79616e84aac4b2c46e9132a4f63b93105d54fe8c0e8f6bffc21fa8d49222"
+dependencies = [
+ "proc-macro-crate",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "zbus_names",
+ "zvariant",
+ "zvariant_utils",
+]
+
+[[package]]
+name = "zbus_names"
+version = "4.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ffd8af6d5b78619bab301ff3c560a5bd22426150253db278f164d6cf3b72c50f"
+dependencies = [
+ "serde",
+ "winnow",
+ "zvariant",
+]
+
[[package]]
name = "zed-async-tar"
version = "0.5.0-zed"
@@ -6732,7 +7503,7 @@ dependencies = [
"wasm-bindgen-futures",
"wasm-streams",
"web-sys",
- "windows-registry",
+ "windows-registry 0.4.0",
]
[[package]]
@@ -6787,6 +7558,20 @@ name = "zeroize"
version = "1.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
+dependencies = [
+ "zeroize_derive",
+]
+
+[[package]]
+name = "zeroize_derive"
+version = "1.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
[[package]]
name = "zerotrie"
@@ -6865,3 +7650,44 @@ checksum = "410e9ecef634c709e3831c2cfdb8d9c32164fae1c67496d5b68fff728eec37fe"
dependencies = [
"zune-core 0.5.1",
]
+
+[[package]]
+name = "zvariant"
+version = "5.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5708299b21903bbe348e94729f22c49c55d04720a004aa350f1f9c122fd2540b"
+dependencies = [
+ "endi",
+ "enumflags2",
+ "serde",
+ "serde_bytes",
+ "winnow",
+ "zvariant_derive",
+ "zvariant_utils",
+]
+
+[[package]]
+name = "zvariant_derive"
+version = "5.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b59b012ebe9c46656f9cc08d8da8b4c726510aef12559da3e5f1bf72780752c"
+dependencies = [
+ "proc-macro-crate",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "zvariant_utils",
+]
+
+[[package]]
+name = "zvariant_utils"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f75c23a64ef8f40f13a6989991e643554d9bef1d682a281160cf0c1bc389c5e9"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "serde",
+ "syn",
+ "winnow",
+]
diff --git a/Cargo.toml b/Cargo.toml
index 92d9e54864..13a5c8ce94 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,3 +1,13 @@
+[workspace]
+members = [
+ ".",
+ "tooling/macros",
+]
+default-members = [
+ ".",
+]
+resolver = "3"
+
[package]
name = "gpui-ce"
version = "0.3.3"
@@ -14,15 +24,18 @@ categories = ["gui"]
autoexamples = false
[features]
-default = ["font-kit"]
+default = ["font-kit", "windows-manifest"]
test-support = [
"leak-detection",
+ "backtrace",
"collections/test-support",
"util/test-support",
"http_client/test-support",
]
-inspector = ["gpui_macros/inspector"]
+inspector = ["gpui-ce-macros/inspector"]
leak-detection = ["backtrace"]
+runtime_shaders = []
+windows-manifest = []
[lib]
name = "gpui"
@@ -30,25 +43,21 @@ path = "src/gpui.rs"
doctest = false
[dependencies]
-pollster = "0.4.0"
-winit = "0.30.12"
-wgpu = "28"
-priority-threadpool = { git = "https://github.com/mdeand/priority-threadpool" }
anyhow = "1.0.86"
+async-channel = "2"
async-task = "4.7"
backtrace = { version = "0.3", optional = true }
bytemuck = { version = "1.24", features = ["derive"] }
+chrono = "0.4"
circular-buffer = "1.0"
collections = { package = "gpui_collections", version = "0.2.2" }
cosmic-text = "0.18.2"
ctor = "0.6.3"
derive_more = { version = "2.1.1", features = ["full"] }
etagere = "0.2"
-flume = "0.12"
-# font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "110523127440aefb11ce0cf280ae7c5071337ec5", package = "zed-font-kit", version = "0.14.1-zed", optional = true }
-font-kit = { version = "0.14.3", optional = true }
futures = "0.3"
-gpui_macros = { package = "gpui-macros", version = "0.2.2" }
+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"
@@ -59,10 +68,11 @@ lyon = "1.0"
num_cpus = "1.13"
parking = "2.0.0"
parking_lot = "0.12.1"
-pathfinder_geometry = "0.5"
pin-project = "1.1.10"
+pollster = "0.4.0"
postage = { version = "0.5", features = ["futures-traits"] }
profiling = "1"
+priority-threadpool = { git = "https://github.com/mdeand/priority-threadpool" }
rand = "0.10"
raw-window-handle = "0.6"
refineable = { package = "gpui_refineable", version = "0.2.2" }
@@ -90,19 +100,54 @@ util_macros = { package = "gpui_util_macros", version = "0.2.2" }
usvg = { version = "0.47.0", default-features = false }
uuid = { version = "1.1.2", features = ["v4", "v5", "v7", "serde"] }
waker-fn = "1.2.0"
+web-time = "1"
+wgpu = "28"
+winit = "0.30.12"
+
+[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.12"
+# font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "110523127440aefb11ce0cf280ae7c5071337ec5", package = "zed-font-kit", version = "0.14.1-zed", optional = true }
+font-kit = { version = "0.14.3", 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.12"
+oo7 = { version = "0.6", default-features = false, features = [
+ "async-std",
+ "native_crypto",
+] }
+swash = "0.2.6"
+
+[target.'cfg(target_os = "windows")'.dependencies]
+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",
-] }
+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",
-] }
+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"] }
-rand = "0.10"
+proptest = "1"
unicode-segmentation = "1.10"
util = { package = "gpui_util", version = "0.2.2", features = ["test-support"] }
diff --git a/LICENSE-APACHE b/LICENSE-APACHE
deleted file mode 100644
index 461a0fe5ba..0000000000
--- a/LICENSE-APACHE
+++ /dev/null
@@ -1,222 +0,0 @@
-Copyright 2022 - 2025 Zed Industries, Inc.
-
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-
-
-Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-
- 1. Definitions.
-
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
-
- END OF TERMS AND CONDITIONS
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000000..ed7ebb21b0
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,169 @@
+# Apache License
+
+_Version 2.0, January 2004_
+_<>_
+
+### Terms and Conditions for use, reproduction, and distribution
+
+#### 1. Definitions
+
+“License” shall mean the terms and conditions for use, reproduction, and
+distribution as defined by Sections 1 through 9 of this document.
+
+“Licensor” shall mean the copyright owner or entity authorized by the copyright
+owner that is granting the License.
+
+“Legal Entity” shall mean the union of the acting entity and all other entities
+that control, are controlled by, or are under common control with that entity.
+For the purposes of this definition, “control” means **(i)** the power, direct or
+indirect, to cause the direction or management of such entity, whether by
+contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the
+outstanding shares, or **(iii)** beneficial ownership of such entity.
+
+“You” (or “Your”) shall mean an individual or Legal Entity exercising
+permissions granted by this License.
+
+“Source” form shall mean the preferred form for making modifications, including
+but not limited to software source code, documentation source, and configuration
+files.
+
+“Object” form shall mean any form resulting from mechanical transformation or
+translation of a Source form, including but not limited to compiled object code,
+generated documentation, and conversions to other media types.
+
+“Work” shall mean the work of authorship, whether in Source or Object form, made
+available under the License, as indicated by a copyright notice that is included
+in or attached to the work (an example is provided in the Appendix below).
+
+“Derivative Works” shall mean any work, whether in Source or Object form, that
+is based on (or derived from) the Work and for which the editorial revisions,
+annotations, elaborations, or other modifications represent, as a whole, an
+original work of authorship. For the purposes of this License, Derivative Works
+shall not include works that remain separable from, or merely link (or bind by
+name) to the interfaces of, the Work and Derivative Works thereof.
+
+“Contribution” shall mean any work of authorship, including the original version
+of the Work and any modifications or additions to that Work or Derivative Works
+thereof, that is intentionally submitted to Licensor for inclusion in the Work
+by the copyright owner or by an individual or Legal Entity authorized to submit
+on behalf of the copyright owner. For the purposes of this definition,
+“submitted” means any form of electronic, verbal, or written communication sent
+to the Licensor or its representatives, including but not limited to
+communication on electronic mailing lists, source code control systems, and
+issue tracking systems that are managed by, or on behalf of, the Licensor for
+the purpose of discussing and improving the Work, but excluding communication
+that is conspicuously marked or otherwise designated in writing by the copyright
+owner as “Not a Contribution.”
+
+“Contributor” shall mean Licensor and any individual or Legal Entity on behalf
+of whom a Contribution has been received by Licensor and subsequently
+incorporated within the Work.
+
+#### 2. Grant of Copyright License
+
+Subject to the terms and conditions of this License, each Contributor hereby
+grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+irrevocable copyright license to reproduce, prepare Derivative Works of,
+publicly display, publicly perform, sublicense, and distribute the Work and such
+Derivative Works in Source or Object form.
+
+#### 3. Grant of Patent License
+
+Subject to the terms and conditions of this License, each Contributor hereby
+grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+irrevocable (except as stated in this section) patent license to make, have
+made, use, offer to sell, sell, import, and otherwise transfer the Work, where
+such license applies only to those patent claims licensable by such Contributor
+that are necessarily infringed by their Contribution(s) alone or by combination
+of their Contribution(s) with the Work to which such Contribution(s) was
+submitted. If You institute patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that the Work or a
+Contribution incorporated within the Work constitutes direct or contributory
+patent infringement, then any patent licenses granted to You under this License
+for that Work shall terminate as of the date such litigation is filed.
+
+#### 4. Redistribution
+
+You may reproduce and distribute copies of the Work or Derivative Works thereof
+in any medium, with or without modifications, and in Source or Object form,
+provided that You meet the following conditions:
+
+- **(a)** You must give any other recipients of the Work or Derivative Works a copy of
+ this License; and
+- **(b)** You must cause any modified files to carry prominent notices stating that You
+ changed the files; and
+- **(c)** You must retain, in the Source form of any Derivative Works that You distribute,
+ all copyright, patent, trademark, and attribution notices from the Source form
+ of the Work, excluding those notices that do not pertain to any part of the
+ Derivative Works; and
+- **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any
+ Derivative Works that You distribute must include a readable copy of the
+ attribution notices contained within such NOTICE file, excluding those notices
+ that do not pertain to any part of the Derivative Works, in at least one of the
+ following places: within a NOTICE text file distributed as part of the
+ Derivative Works; within the Source form or documentation, if provided along
+ with the Derivative Works; or, within a display generated by the Derivative
+ Works, if and wherever such third-party notices normally appear. The contents of
+ the NOTICE file are for informational purposes only and do not modify the
+ License. You may add Your own attribution notices within Derivative Works that
+ You distribute, alongside or as an addendum to the NOTICE text from the Work,
+ provided that such additional attribution notices cannot be construed as
+ modifying the License.
+
+You may add Your own copyright statement to Your modifications and may provide
+additional or different license terms and conditions for use, reproduction, or
+distribution of Your modifications, or for any such Derivative Works as a whole,
+provided Your use, reproduction, and distribution of the Work otherwise complies
+with the conditions stated in this License.
+
+#### 5. Submission of Contributions
+
+Unless You explicitly state otherwise, any Contribution intentionally submitted
+for inclusion in the Work by You to the Licensor shall be under the terms and
+conditions of this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify the terms of
+any separate license agreement you may have executed with Licensor regarding
+such Contributions.
+
+#### 6. Trademarks
+
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+#### 7. Disclaimer of Warranty
+
+Unless required by applicable law or agreed to in writing, Licensor provides the
+Work (and each Contributor provides its Contributions) on an “AS IS” BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
+including, without limitation, any warranties or conditions of TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
+solely responsible for determining the appropriateness of using or
+redistributing the Work and assume any risks associated with Your exercise of
+permissions under this License.
+
+#### 8. Limitation of Liability
+
+In no event and under no legal theory, whether in tort (including negligence),
+contract, or otherwise, unless required by applicable law (such as deliberate
+and grossly negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special, incidental,
+or consequential damages of any character arising as a result of this License or
+out of the use or inability to use the Work (including but not limited to
+damages for loss of goodwill, work stoppage, computer failure or malfunction, or
+any and all other commercial damages or losses), even if such Contributor has
+been advised of the possibility of such damages.
+
+#### 9. Accepting Warranty or Additional Liability
+
+While redistributing the Work or Derivative Works thereof, You may choose to
+offer, and charge a fee for, acceptance of support, warranty, indemnity, or
+other liability obligations and/or rights consistent with this License. However,
+in accepting such obligations, You may act only on Your own behalf and on Your
+sole responsibility, not on behalf of any other Contributor, and only if You
+agree to indemnify, defend, and hold each Contributor harmless for any liability
+incurred by, or claims asserted against, such Contributor by reason of your
+accepting any such warranty or additional liability.
+
+_END OF TERMS AND CONDITIONS_
diff --git a/examples/learn/wgpu_surface.rs b/examples/learn/wgpu_surface.rs
index b8e1ed548a..d840f24234 100644
--- a/examples/learn/wgpu_surface.rs
+++ b/examples/learn/wgpu_surface.rs
@@ -36,7 +36,7 @@ struct SurfaceExample {
}
impl Render for SurfaceExample {
- fn render(&mut self, window: &mut Window, cx: &mut Context) -> impl IntoElement {
+ fn render(&mut self, window: &mut Window, _cx: &mut Context) -> impl IntoElement {
// pull any pending fps samples from channel
while let Ok(f) = self.fps_rx.try_recv() {
self.display_fps = f;
@@ -323,7 +323,7 @@ fn fs_main(in: VSOut) -> @location(0) vec4 {
usage: wgpu::TextureUsages::RENDER_ATTACHMENT,
view_formats: &[],
});
- let depth_view = depth_tex.create_view(&wgpu::TextureViewDescriptor::default());
+ let _depth_view = depth_tex.create_view(&wgpu::TextureViewDescriptor::default());
let uniform_buf = device.create_buffer_init(&wgpu::util::BufferInitDescriptor{
label: Some("CubeUniformBuf"),
@@ -374,6 +374,7 @@ fn fs_main(in: VSOut) -> @location(0) vec4 {
label: Some("SurfaceExample Pass"),
color_attachments: &[Some(wgpu::RenderPassColorAttachment{
view: &view,
+ depth_slice: None,
resolve_target: None,
ops: wgpu::Operations{
load: wgpu::LoadOp::Clear(wgpu::Color::BLACK),
@@ -388,6 +389,7 @@ fn fs_main(in: VSOut) -> @location(0) vec4 {
}),
stencil_ops: None,
}),
+ multiview_mask: None,
occlusion_query_set: None,
timestamp_writes: None,
});
diff --git a/examples/legacy/window.rs b/examples/legacy/window.rs
index 06003c4663..b5159a36ea 100644
--- a/examples/legacy/window.rs
+++ b/examples/legacy/window.rs
@@ -1,5 +1,5 @@
use gpui::{
- App, Application, Bounds, Context, KeyBinding, PromptButton, PromptLevel, Timer, Window,
+ App, Application, Bounds, Context, KeyBinding, PromptButton, PromptLevel, Window,
WindowBounds, WindowKind, WindowOptions, actions, div, prelude::*, px, rgb, size,
};
@@ -188,7 +188,7 @@ impl Render for WindowDemo {
// Restore the application after 3 seconds
window
.spawn(cx, async move |cx| {
- Timer::after(std::time::Duration::from_secs(3)).await;
+ smol::Timer::after(std::time::Duration::from_secs(3)).await;
cx.update(|_, cx| {
cx.activate(false);
})
diff --git a/flake.lock b/flake.lock
index a61915afba..d8bbb50ac0 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,19 +1,33 @@
{
"nodes": {
+ "crane": {
+ "locked": {
+ "lastModified": 1773857772,
+ "narHash": "sha256-5xsK26KRHf0WytBtsBnQYC/lTWDhQuT57HJ7SzuqZcM=",
+ "owner": "ipetkov",
+ "repo": "crane",
+ "rev": "b556d7bbae5ff86e378451511873dfd07e4504cd",
+ "type": "github"
+ },
+ "original": {
+ "owner": "ipetkov",
+ "repo": "crane",
+ "type": "github"
+ }
+ },
"fenix": {
"inputs": {
"nixpkgs": [
- "naersk",
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
- "lastModified": 1752475459,
- "narHash": "sha256-z6QEu4ZFuHiqdOPbYss4/Q8B0BFhacR8ts6jO/F/aOU=",
+ "lastModified": 1774076307,
+ "narHash": "sha256-v8axK9HGgVERw9oG3SKdsuE+ri0GPUZDyRBN4GLqQ1c=",
"owner": "nix-community",
"repo": "fenix",
- "rev": "bf0d6f70f4c9a9cf8845f992105652173f4b617f",
+ "rev": "556198cc6c69c0a13228a15e33b2360f333b0092",
"type": "github"
},
"original": {
@@ -40,64 +54,13 @@
"type": "github"
}
},
- "naersk": {
- "inputs": {
- "fenix": "fenix",
- "nixpkgs": "nixpkgs"
- },
- "locked": {
- "lastModified": 1769799857,
- "narHash": "sha256-88IFXZ7Sa1vxbz5pty0Io5qEaMQMMUPMonLa3Ls/ss4=",
- "owner": "nix-community",
- "repo": "naersk",
- "rev": "9d4ed44d8b8cecdceb1d6fd76e74123d90ae6339",
- "type": "github"
- },
- "original": {
- "owner": "nix-community",
- "repo": "naersk",
- "type": "github"
- }
- },
"nixpkgs": {
"locked": {
- "lastModified": 1752077645,
- "narHash": "sha256-HM791ZQtXV93xtCY+ZxG1REzhQenSQO020cu6rHtAPk=",
+ "lastModified": 1773840656,
+ "narHash": "sha256-9tpvMGFteZnd3gRQZFlRCohVpqooygFuy9yjuyRL2C0=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "be9e214982e20b8310878ac2baa063a961c1bdf6",
- "type": "github"
- },
- "original": {
- "owner": "NixOS",
- "ref": "nixpkgs-unstable",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
- "nixpkgs_2": {
- "locked": {
- "lastModified": 1770141374,
- "narHash": "sha256-yD4K/vRHPwXbJf5CK3JkptBA6nFWUKNX/jlFp2eKEQc=",
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "41965737c1797c1d83cfb0b644ed0840a6220bd1",
- "type": "github"
- },
- "original": {
- "owner": "NixOS",
- "ref": "nixpkgs-unstable",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
- "nixpkgs_3": {
- "locked": {
- "lastModified": 1744536153,
- "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
+ "rev": "9cf7092bdd603554bd8b63c216e8943cf9b12512",
"type": "github"
},
"original": {
@@ -109,20 +72,20 @@
},
"root": {
"inputs": {
+ "crane": "crane",
+ "fenix": "fenix",
"flake-utils": "flake-utils",
- "naersk": "naersk",
- "nixpkgs": "nixpkgs_2",
- "rust-overlay": "rust-overlay"
+ "nixpkgs": "nixpkgs"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
- "lastModified": 1752428706,
- "narHash": "sha256-EJcdxw3aXfP8Ex1Nm3s0awyH9egQvB2Gu+QEnJn2Sfg=",
+ "lastModified": 1774036669,
+ "narHash": "sha256-EWhsBSh/h1VcyLKXuTEyH8lNVB2ktuKVkqx8dkQ6hxk=",
"owner": "rust-lang",
"repo": "rust-analyzer",
- "rev": "591e3b7624be97e4443ea7b5542c191311aa141d",
+ "rev": "0cf3e8a07f0e29825f5db78840e646a4bb519742",
"type": "github"
},
"original": {
@@ -132,24 +95,6 @@
"type": "github"
}
},
- "rust-overlay": {
- "inputs": {
- "nixpkgs": "nixpkgs_3"
- },
- "locked": {
- "lastModified": 1770174315,
- "narHash": "sha256-GUaMxDmJB1UULsIYpHtfblskVC6zymAaQ/Zqfo+13jc=",
- "owner": "oxalica",
- "repo": "rust-overlay",
- "rev": "095c394bb91342882f27f6c73f64064fb9de9f2a",
- "type": "github"
- },
- "original": {
- "owner": "oxalica",
- "repo": "rust-overlay",
- "type": "github"
- }
- },
"systems": {
"locked": {
"lastModified": 1681028828,
diff --git a/flake.nix b/flake.nix
index 1bc7e7c151..0632bdfc4e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,100 +1,121 @@
{
+ description = "Standalone GPUI build";
+
inputs = {
- flake-utils.url = "github:numtide/flake-utils";
- naersk.url = "github:nix-community/naersk";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
- rust-overlay.url = "github:oxalica/rust-overlay";
+ fenix = {
+ url = "github:nix-community/fenix";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ crane.url = "github:ipetkov/crane";
+ flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
- flake-utils,
- naersk,
nixpkgs,
- rust-overlay,
+ fenix,
+ crane,
+ flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
- pkgs = (import nixpkgs) {
- inherit system;
- overlays = [
- (import rust-overlay)
- ];
- };
+ pkgs = nixpkgs.legacyPackages.${system};
+ inherit (pkgs) lib;
+
+ toolchain = fenix.packages.${system}.latest.withComponents [
+ "cargo"
+ "rustc"
+ "rust-src"
+ "rustfmt"
+ "clippy"
+ ];
- naersk' = pkgs.callPackage naersk { };
+ craneLib = (crane.mkLib pkgs).overrideToolchain toolchain;
- buildInputs = with pkgs; [
+ src = lib.cleanSourceWith {
+ src = craneLib.path ./.;
+ filter =
+ path: type:
+ (craneLib.filterCargoSources path type)
+ || (lib.hasSuffix ".metal" path)
+ || (lib.hasSuffix ".wgsl" path)
+ || (lib.hasSuffix ".hlsl" path)
+ || (lib.hasSuffix ".glsl" path);
+ };
+
+ linuxLibs = with pkgs; [
+ alsa-lib
+ libdrm
+ mesa # provides libgbm
libxkbcommon
- wayland
+ libva
vulkan-loader
+ wayland
xorg.libX11
- xorg.libXcursor
- xorg.libXi
- xorg.libXrandr
xorg.libxcb
- xorg.libXrender
- xorg.libXfixes
- fontconfig
- freetype
- openssl
- libgit2
- alsa-lib
- zlib
- stdenv.cc.cc.lib
];
- nativeBuildInputs = with pkgs; [
- (pkgs.rust-bin.stable.latest.default.override {
- extensions = [
- "rust-src"
- "cargo"
- "rustc"
- ];
- })
- pkg-config
- cmake
- perl
- python3
- ];
- in
- rec {
- devShell = pkgs.mkShell {
- RUST_SRC_PATH = "${
- pkgs.rust-bin.stable.latest.default.override {
- extensions = [ "rust-src" ];
- }
- }/lib/rustlib/src/rust/library";
-
- LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
- XDG_SESSION_TYPE = "wayland";
- shellHook = ''
- export WAYLAND_DISPLAY=''${WAYLAND_DISPLAY:-wayland-0}
- export XDG_RUNTIME_DIR=''${XDG_RUNTIME_DIR:-/run/user/$(id -u)}
- export VK_LAYER_PATH="${pkgs.renderdoc}/lib:${pkgs.renderdoc}/lib64:${pkgs.renderdoc}/share/vulkan/implicit_layer.d:$VK_LAYER_PATH"
- export VK_INSTANCE_LAYERS="VK_LAYER_RENDERDOC_Capture:$VK_INSTANCE_LAYERS"
- '';
+ commonArgs = {
+ pname = "gpui-ce";
+ version = "0.3.3";
- nativeBuildInputs =
+ inherit src;
+ strictDeps = true;
+
+ nativeBuildInputs = with pkgs; [
+ cmake
+ pkg-config
+ rustPlatform.bindgenHook
+ ];
+
+ buildInputs =
with pkgs;
[
- nixfmt
- cmake
- rustc
- rustfmt
- cargo
- clippy
- rust-analyzer
- vulkan-tools
- vulkan-loader
- vulkan-validation-layers
- renderdoc
+ fontconfig
+ freetype
+ openssl
+ zlib
]
- ++ buildInputs
- ++ nativeBuildInputs;
+ ++ lib.optionals stdenv.isLinux linuxLibs
+ ++ lib.optionals stdenv.isDarwin [
+ apple-sdk_15
+ (darwinMinVersionHook "11.0")
+ ];
+
+ env = lib.optionalAttrs pkgs.stdenv.isLinux {
+ LD_LIBRARY_PATH = lib.makeLibraryPath linuxLibs;
+ };
+
+ cargoExtraArgs = "--features runtime_shaders";
+ };
+
+ cargoArtifacts = craneLib.buildDepsOnly commonArgs;
+
+ gpui = craneLib.buildPackage (
+ commonArgs
+ // {
+ inherit cargoArtifacts;
+ }
+ );
+ in
+ {
+ packages.default = gpui;
+
+ devShells.default = pkgs.mkShell {
+ inputsFrom = [ gpui ];
+ packages = [ toolchain ];
+
+ shellHook = ''
+ export RUST_BACKTRACE=1
+ export RUST_SRC_PATH="${toolchain}/lib/rustlib/src/rust/library"
+ ${lib.optionalString pkgs.stdenv.isLinux ''
+ export LD_LIBRARY_PATH="${lib.makeLibraryPath linuxLibs}:$LD_LIBRARY_PATH"
+ ''}
+ '';
};
}
);
-}
\ No newline at end of file
+}
diff --git a/assets/fonts/ibm-plex-sans/IBMPlexSans-Bold.ttf b/resources/fonts/ibm-plex-sans/IBMPlexSans-Bold.ttf
similarity index 100%
rename from assets/fonts/ibm-plex-sans/IBMPlexSans-Bold.ttf
rename to resources/fonts/ibm-plex-sans/IBMPlexSans-Bold.ttf
diff --git a/assets/fonts/ibm-plex-sans/IBMPlexSans-BoldItalic.ttf b/resources/fonts/ibm-plex-sans/IBMPlexSans-BoldItalic.ttf
similarity index 100%
rename from assets/fonts/ibm-plex-sans/IBMPlexSans-BoldItalic.ttf
rename to resources/fonts/ibm-plex-sans/IBMPlexSans-BoldItalic.ttf
diff --git a/assets/fonts/ibm-plex-sans/IBMPlexSans-Italic.ttf b/resources/fonts/ibm-plex-sans/IBMPlexSans-Italic.ttf
similarity index 100%
rename from assets/fonts/ibm-plex-sans/IBMPlexSans-Italic.ttf
rename to resources/fonts/ibm-plex-sans/IBMPlexSans-Italic.ttf
diff --git a/assets/fonts/ibm-plex-sans/IBMPlexSans-Regular.ttf b/resources/fonts/ibm-plex-sans/IBMPlexSans-Regular.ttf
similarity index 100%
rename from assets/fonts/ibm-plex-sans/IBMPlexSans-Regular.ttf
rename to resources/fonts/ibm-plex-sans/IBMPlexSans-Regular.ttf
diff --git a/assets/fonts/ibm-plex-sans/license.txt b/resources/fonts/ibm-plex-sans/license.txt
similarity index 100%
rename from assets/fonts/ibm-plex-sans/license.txt
rename to resources/fonts/ibm-plex-sans/license.txt
diff --git a/assets/fonts/lilex/Lilex-Bold.ttf b/resources/fonts/lilex/Lilex-Bold.ttf
similarity index 100%
rename from assets/fonts/lilex/Lilex-Bold.ttf
rename to resources/fonts/lilex/Lilex-Bold.ttf
diff --git a/assets/fonts/lilex/Lilex-BoldItalic.ttf b/resources/fonts/lilex/Lilex-BoldItalic.ttf
similarity index 100%
rename from assets/fonts/lilex/Lilex-BoldItalic.ttf
rename to resources/fonts/lilex/Lilex-BoldItalic.ttf
diff --git a/assets/fonts/lilex/Lilex-Italic.ttf b/resources/fonts/lilex/Lilex-Italic.ttf
similarity index 100%
rename from assets/fonts/lilex/Lilex-Italic.ttf
rename to resources/fonts/lilex/Lilex-Italic.ttf
diff --git a/assets/fonts/lilex/Lilex-Regular.ttf b/resources/fonts/lilex/Lilex-Regular.ttf
similarity index 100%
rename from assets/fonts/lilex/Lilex-Regular.ttf
rename to resources/fonts/lilex/Lilex-Regular.ttf
diff --git a/assets/fonts/lilex/OFL.txt b/resources/fonts/lilex/OFL.txt
similarity index 100%
rename from assets/fonts/lilex/OFL.txt
rename to resources/fonts/lilex/OFL.txt
diff --git a/script/clippy b/scripts/clippy
similarity index 100%
rename from script/clippy
rename to scripts/clippy
diff --git a/script/clippy.ps1 b/scripts/clippy.ps1
similarity index 100%
rename from script/clippy.ps1
rename to scripts/clippy.ps1
diff --git a/script/linux b/scripts/linux
similarity index 100%
rename from script/linux
rename to scripts/linux
diff --git a/script/metal-debug b/scripts/metal-debug
similarity index 100%
rename from script/metal-debug
rename to scripts/metal-debug
diff --git a/src/action.rs b/src/action.rs
index 38e94aa356..f2ddee97e5 100644
--- a/src/action.rs
+++ b/src/action.rs
@@ -1,6 +1,6 @@
use anyhow::{Context as _, Result};
use collections::HashMap;
-pub use gpui_macros::Action;
+pub use gpui_ce_macros::Action;
pub use no_action::{NoAction, is_no_action};
use serde_json::json;
use std::{
diff --git a/src/app.rs b/src/app.rs
index d95906cecc..3fe0554113 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -759,7 +759,7 @@ impl App {
let futures = futures::future::join_all(futures);
if self
- .background_executor
+ .foreground_executor
.block_with_timeout(SHUTDOWN_TIMEOUT, futures)
.is_err()
{
@@ -769,6 +769,12 @@ impl App {
self.quitting = false;
}
+ /// Returns a handle to the entity ref counts, used by the test macro for cleanup.
+ #[doc(hidden)]
+ pub fn ref_counts_drop_handle(&self) -> impl Sized + use<> {
+ self.entities.ref_counts_drop_handle()
+ }
+
/// Get the id of the current keyboard layout
pub fn keyboard_layout(&self) -> &dyn PlatformKeyboardLayout {
self.keyboard_layout.as_ref()
diff --git a/src/app/entity_map.rs b/src/app/entity_map.rs
index 8c1bdfa1ce..1ed2074101 100644
--- a/src/app/entity_map.rs
+++ b/src/app/entity_map.rs
@@ -60,7 +60,7 @@ pub(crate) struct EntityMap {
ref_counts: Arc>,
}
-struct EntityRefCounts {
+pub(crate) struct EntityRefCounts {
counts: SlotMap,
dropped_entity_ids: Vec,
#[cfg(any(test, feature = "leak-detection"))]
@@ -84,6 +84,11 @@ impl EntityMap {
}
}
+ /// Returns a handle to the ref counts for test cleanup.
+ pub fn ref_counts_drop_handle(&self) -> Arc> {
+ self.ref_counts.clone()
+ }
+
/// Reserve a slot for an entity, which you can subsequently use with `insert`.
pub fn reserve(&self) -> Slot {
let id = self.ref_counts.write().counts.insert(1.into());
diff --git a/src/app/test_context.rs b/src/app/test_context.rs
index 9e9055055d..9174616369 100644
--- a/src/app/test_context.rs
+++ b/src/app/test_context.rs
@@ -8,7 +8,6 @@ use crate::{
};
use anyhow::{anyhow, bail};
use futures::{Stream, StreamExt, channel::oneshot};
-use rand::{SeedableRng, rngs::StdRng};
use std::{
cell::RefCell, future::Future, ops::Deref, path::PathBuf, rc::Rc, sync::Arc, time::Duration,
};
@@ -153,7 +152,7 @@ impl TestAppContext {
/// Create a single TestAppContext, for non-multi-client tests
pub fn single() -> Self {
- let dispatcher = TestDispatcher::new(StdRng::seed_from_u64(0));
+ let dispatcher = TestDispatcher::new(0);
Self::build(dispatcher, None)
}
diff --git a/src/elements/surface.rs b/src/elements/surface.rs
index 7468251918..510ea9802e 100644
--- a/src/elements/surface.rs
+++ b/src/elements/surface.rs
@@ -10,12 +10,14 @@ pub enum SurfaceSource {}
/// A surface element.
pub struct Surface {
+ #[allow(dead_code)]
source: SurfaceSource,
object_fit: ObjectFit,
style: StyleRefinement,
}
/// Create a new surface element.
+#[allow(unreachable_code)]
pub fn surface(source: impl Into) -> Surface {
Surface {
source: source.into(),
diff --git a/src/elements/uniform_list.rs b/src/elements/uniform_list.rs
index 1e38b0e7ac..766525dc09 100644
--- a/src/elements/uniform_list.rs
+++ b/src/elements/uniform_list.rs
@@ -712,7 +712,7 @@ mod test {
#[gpui::test]
fn test_scroll_strategy_nearest(cx: &mut TestAppContext) {
use crate::{
- Context, FocusHandle, ScrollStrategy, UniformListScrollHandle, Window, actions, div,
+ Context, FocusHandle, ScrollStrategy, UniformListScrollHandle, Window, div,
prelude::*, px, uniform_list,
};
use std::ops::Range;
diff --git a/src/executor.rs b/src/executor.rs
index a219a20e92..a188b002cd 100644
--- a/src/executor.rs
+++ b/src/executor.rs
@@ -1,98 +1,35 @@
-use crate::{App, PlatformDispatcher, RunnableMeta, RunnableVariant, TaskTiming, profiler};
-use async_task::Runnable;
+use crate::scheduler::Instant;
+use crate::scheduler::Scheduler;
+use crate::{App, PlatformDispatcher, PlatformScheduler};
use futures::channel::mpsc;
-use parking_lot::{Condvar, Mutex};
-use smol::prelude::*;
+use futures::prelude::*;
use std::{
- fmt::Debug,
- marker::PhantomData,
- mem::{self, ManuallyDrop},
- num::NonZeroUsize,
- panic::Location,
- pin::Pin,
- rc::Rc,
- sync::{
- Arc,
- atomic::{AtomicUsize, Ordering},
- },
- task::{Context, Poll},
- thread::{self, ThreadId},
- time::{Duration, Instant},
+ fmt::Debug, future::Future, marker::PhantomData, mem, pin::Pin, rc::Rc, sync::Arc,
+ time::Duration,
};
use util::TryFutureExt;
-use waker_fn::waker_fn;
-#[cfg(any(test, feature = "test-support"))]
-use rand::rngs::StdRng;
+pub use crate::scheduler::{
+ FallibleTask, ForegroundExecutor as SchedulerForegroundExecutor, Priority,
+};
/// A pointer to the executor that is currently running,
/// for spawning background tasks.
#[derive(Clone)]
pub struct BackgroundExecutor {
- #[doc(hidden)]
- pub dispatcher: Arc,
+ inner: crate::scheduler::BackgroundExecutor,
+ dispatcher: Arc,
}
/// A pointer to the executor that is currently running,
/// for spawning tasks on the main thread.
-///
-/// This is intentionally `!Send` via the `not_send` marker field. This is because
-/// `ForegroundExecutor::spawn` does not require `Send` but checks at runtime that the future is
-/// only polled from the same thread it was spawned from. These checks would fail when spawning
-/// foreground tasks from background threads.
#[derive(Clone)]
pub struct ForegroundExecutor {
- #[doc(hidden)]
- pub dispatcher: Arc,
+ inner: crate::scheduler::ForegroundExecutor,
+ dispatcher: Arc,
not_send: PhantomData>,
}
-/// Realtime task priority
-#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
-#[repr(u8)]
-pub enum RealtimePriority {
- /// Audio task
- Audio,
- /// Other realtime task
- #[default]
- Other,
-}
-
-/// Task priority
-#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
-#[repr(u8)]
-pub enum Priority {
- /// Realtime priority
- ///
- /// Spawning a task with this priority will spin it off on a separate thread dedicated just to that task.
- Realtime(RealtimePriority),
- /// High priority
- ///
- /// Only use for tasks that are critical to the user experience / responsiveness of the editor.
- High,
- /// Medium priority, probably suits most of your use cases.
- #[default]
- Medium,
- /// Low priority
- ///
- /// Prioritize this for background work that can come in large quantities
- /// to not starve the executor of resources for high priority tasks
- Low,
-}
-
-impl Priority {
- #[allow(dead_code)]
- pub(crate) const fn probability(&self) -> u32 {
- match self {
- // realtime priorities are not considered for probability scheduling
- Priority::Realtime(_) => 0,
- Priority::High => 60,
- Priority::Medium => 30,
- Priority::Low => 10,
- }
- }
-}
-
/// Task is a primitive that allows work to happen in the background.
///
/// It implements [`Future`] so you can `.await` on it.
@@ -101,39 +38,44 @@ impl Priority {
/// the task to continue running, but with no way to return a value.
#[must_use]
#[derive(Debug)]
-pub struct Task(TaskState);
-
-#[derive(Debug)]
-enum TaskState {
- /// A task that is ready to return a value
- Ready(Option),
-
- /// A task that is currently running.
- Spawned(async_task::Task),
-}
+pub struct Task(crate::scheduler::Task);
impl Task {
- /// Creates a new task that will resolve with the value
+ /// Creates a new task that will resolve with the value.
pub fn ready(val: T) -> Self {
- Task(TaskState::Ready(Some(val)))
+ Task(crate::scheduler::Task::ready(val))
}
- /// Detaching a task runs it to completion in the background
+ /// Returns true if the task has completed or was created with `Task::ready`.
+ pub fn is_ready(&self) -> bool {
+ self.0.is_ready()
+ }
+
+ /// Detaching a task runs it to completion in the background.
pub fn detach(self) {
- match self {
- Task(TaskState::Ready(_)) => {}
- Task(TaskState::Spawned(task)) => task.detach(),
- }
+ self.0.detach()
+ }
+
+ /// Wraps a scheduler Task.
+ pub fn from_scheduler(task: crate::scheduler::Task) -> Self {
+ Task(task)
+ }
+
+ /// Converts this task into a fallible task that returns `Option`.
+ ///
+ /// Unlike the standard `Task`, a [`FallibleTask`] will return `None`
+ /// if the task was cancelled.
+ pub fn fallible(self) -> FallibleTask {
+ self.0.fallible()
}
}
-impl Task>
+impl Task>
where
T: 'static,
E: 'static + Debug,
{
- /// Run the task to completion in the background and log any
- /// errors that occur.
+ /// Run the task to completion in the background and log any errors that occur.
#[track_caller]
pub fn detach_and_log_err(self, cx: &App) {
let location = core::panic::Location::caller();
@@ -143,53 +85,42 @@ where
}
}
-impl Future for Task {
+impl std::future::Future for Task {
type Output = T;
- fn poll(self: Pin<&mut Self>, cx: &mut Context) -> Poll {
- match unsafe { self.get_unchecked_mut() } {
- Task(TaskState::Ready(val)) => Poll::Ready(val.take().unwrap()),
- Task(TaskState::Spawned(task)) => task.poll(cx),
- }
+ fn poll(
+ self: std::pin::Pin<&mut Self>,
+ cx: &mut std::task::Context<'_>,
+ ) -> std::task::Poll {
+ // SAFETY: Task is a repr(transparent) wrapper around the scheduler Task,
+ // and we're just projecting the pin through to the inner task.
+ let inner = unsafe { self.map_unchecked_mut(|t| &mut t.0) };
+ inner.poll(cx)
}
}
-/// A task label is an opaque identifier that you can use to
-/// refer to a task in tests.
-#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
-pub struct TaskLabel(NonZeroUsize);
+impl BackgroundExecutor {
+ /// Creates a new BackgroundExecutor from the given PlatformDispatcher.
+ pub fn new(dispatcher: Arc) -> Self {
+ #[cfg(any(test, feature = "test-support"))]
+ let scheduler: Arc = if let Some(test_dispatcher) = dispatcher.as_test() {
+ test_dispatcher.scheduler().clone()
+ } else {
+ Arc::new(PlatformScheduler::new(dispatcher.clone()))
+ };
-impl Default for TaskLabel {
- fn default() -> Self {
- Self::new()
- }
-}
+ #[cfg(not(any(test, feature = "test-support")))]
+ let scheduler: Arc = Arc::new(PlatformScheduler::new(dispatcher.clone()));
-impl TaskLabel {
- /// Construct a new task label.
- pub fn new() -> Self {
- static NEXT_TASK_LABEL: AtomicUsize = AtomicUsize::new(1);
- Self(
- NEXT_TASK_LABEL
- .fetch_add(1, Ordering::SeqCst)
- .try_into()
- .unwrap(),
- )
+ Self {
+ inner: crate::scheduler::BackgroundExecutor::new(scheduler),
+ dispatcher,
+ }
}
-}
-
-type AnyLocalFuture = Pin>>;
-
-type AnyFuture = Pin>>;
-/// BackgroundExecutor lets you run things on background threads.
-/// In production this is a thread pool with no ordering guarantees.
-/// In tests this is simulated by running tasks one by one in a deterministic
-/// (but arbitrary) order controlled by the `SEED` environment variable.
-impl BackgroundExecutor {
- #[doc(hidden)]
- pub fn new(dispatcher: Arc) -> Self {
- Self { dispatcher }
+ /// Returns the underlying crate::scheduler::BackgroundExecutor.
+ pub fn scheduler_executor(&self) -> crate::scheduler::BackgroundExecutor {
+ self.inner.clone()
}
/// Enqueues the given future to be run to completion on a background thread.
@@ -198,10 +129,10 @@ impl BackgroundExecutor {
where
R: Send + 'static,
{
- self.spawn_with_priority(Priority::default(), future)
+ self.spawn_with_priority(Priority::default(), future.boxed())
}
- /// Enqueues the given future to be run to completion on a background thread.
+ /// Enqueues the given future to be run to completion on a background thread with the given priority.
#[track_caller]
pub fn spawn_with_priority(
&self,
@@ -211,19 +142,21 @@ impl BackgroundExecutor {
where
R: Send + 'static,
{
- self.spawn_internal::(Box::pin(future), None, priority)
+ if priority == Priority::RealtimeAudio {
+ Task::from_scheduler(self.inner.spawn_realtime(future))
+ } else {
+ Task::from_scheduler(self.inner.spawn_with_priority(priority, future))
+ }
}
/// Enqueues the given future to be run to completion on a background thread and blocking the current task on it.
- ///
- /// This allows to spawn background work that borrows from its scope. Note that the supplied future will run to
- /// completion before the current task is resumed, even if the current task is slated for cancellation.
pub async fn await_on_background(&self, future: impl Future