Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
ab324ab
gpui: Support Windows Restart Manager shutdown (#62987)
reflectronic Aug 24, 2026
5b461bb
Prewarm Linux font match caches (#63158)
kubkon Aug 24, 2026
843283c
gpui: Make stacker opt-in (#63187)
Veykril Aug 25, 2026
0342ddd
gpui_wgpu: Reuse glyph image after measuring bounds (#63209)
kubkon Aug 25, 2026
e61b926
gpui: Report average dirty-to-present frame timings (#63221)
Anthony-Eid Aug 25, 2026
dbe9a37
gpui: Use platform clock in action profiler (#63183)
labcoder Aug 26, 2026
d507d4f
gpui_windows: Clear render target before compositing COLR emoji (#63225)
39ali Aug 26, 2026
2281886
Fix missing NUL terminator in X11 WM_CLASS (#62848)
HundredBillion Aug 26, 2026
190b0d1
gpui_windows: Implement render_to_image for headless window capture (…
jonx Aug 26, 2026
95db0df
gpui: Don't start a wrapped line with closing punctuation or a slash …
alii Aug 26, 2026
b49177c
gpui_windows: Fix window placement on secondary monitor with differen…
dineshyadav03 Aug 26, 2026
7fed37a
gpui: Separate benchmark support from test support (#63039)
Anthony-Eid Aug 26, 2026
cade19e
gpui_platform: Expose headless renderer through bench support (#63244)
Anthony-Eid Aug 26, 2026
9940b5b
Bump dependencies to dedupe the crate graph (#63231)
SomeoneToIgnore Aug 26, 2026
478daf2
gpui: Text input configuration and web implementation (#63264)
cameron1024 Aug 26, 2026
fa6ef0d
gpui: Fix stale pending input when a window is blurred (#63271)
smitbarmase Aug 26, 2026
989e6e8
gpui: Add text_edit_editable_range API (#63294)
cameron1024 Aug 27, 2026
0560f0c
Improve Windows shell discovery (#63339)
reflectronic Aug 28, 2026
612a076
gpui: Touch events (#63373)
cameron1024 Aug 28, 2026
98a5a51
gpui_web: Let applications provide fonts (#63493)
Veykril Aug 31, 2026
2fecec7
gpui: Gate blocking executor APIs on WebAssembly (#63484)
Veykril Aug 31, 2026
3809634
gpui_macos: Migrate `PlatformWindow::prompt` to `objc2` on MacOS (#59…
tidely Aug 31, 2026
6c4735c
gpui: Platform-specific scroll physics (#63505)
cameron1024 Aug 31, 2026
5e436c1
Support building with corgi (#63396)
ConradIrwin Aug 31, 2026
2ce2701
util: Prevent panic when parsing a malformed shell variable (#63446)
39ali Aug 31, 2026
4b6819b
gpui_web: Tighten up web keyboard feel (#63533)
cameron1024 Sep 1, 2026
4bca204
gpui: Lock touch scrolling to the dominant axis (#63553)
kubkon Sep 1, 2026
d15d0ce
gpui_linux: Prevent panic while reporting Wayland errors (#63159)
cole-miller Sep 1, 2026
29b78f7
gpui: Add long-press gesture recognition (#63561)
kubkon Sep 1, 2026
0bb3468
util: Make fs_embed! compatible with rust-embed's debug-embed feature…
mikayla-maki Sep 1, 2026
bbea843
Relicense zlog, ztracing, and ztracing_macro under Apache-2.0 (#63573)
mikayla-maki Sep 1, 2026
48e02d4
util: Embed fs_embed assets with debug-embed (#63583)
kubkon Sep 1, 2026
58f588c
gpui: Record hang trigger class and set the release frame budget to 2…
Anthony-Eid Sep 2, 2026
d88dc91
Bump more dependencies (#63379)
SomeoneToIgnore Sep 2, 2026
a4a4180
gpui_web: Drive IME mirror focus state from GPUI (#63629)
cameron1024 Sep 2, 2026
522e253
gpui: Prevent touch mispredict jitter (#63638)
cameron1024 Sep 2, 2026
15ff790
gpui: Add `TouchDragEvent` API (#63645)
cameron1024 Sep 2, 2026
09f3e5c
gpui: Snap recomputed padding to the device pixel grid before clampin…
interkelstar Sep 2, 2026
5fe126d
gpui: Add an option to keep hover listeners active after keyboard inp…
smitbarmase Sep 3, 2026
e16ceac
which_key: Add a pending key binding indicator (#63343)
smitbarmase Sep 3, 2026
c088d4e
gpui: Add `Hitbox::is_hovered_at` (#63696)
cameron1024 Sep 3, 2026
04f8535
Redact environment secrets from dev container `docker exec` logs (#63…
coinleftt Sep 4, 2026
e4f8573
Add `disable_ai` check for "Agent Panel" `MenuItem` (#63580)
shxmbles Sep 4, 2026
72534ba
macos: Honor "Tiled windows have margins" for the Fill titlebar actio…
RomainDW Sep 7, 2026
2cf5420
deps: Update to latest version
vrdons Sep 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
520 changes: 307 additions & 213 deletions Cargo.lock

Large diffs are not rendered by default.

217 changes: 108 additions & 109 deletions Cargo.toml

Large diffs are not rendered by default.

21 changes: 14 additions & 7 deletions crates/gpui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ test-support = [
"x11",
"proptest",
]
bench = ["test-support", "profiler", "dep:criterion"]
bench-support = ["profiler", "dep:criterion"]
# Preserve the published feature name while consumers migrate to `bench-support`.
bench = ["bench-support"]
inspector = ["gpui_macros/inspector"]
leak-detection = ["backtrace"]
wayland = []
Expand All @@ -38,6 +40,7 @@ screen-capture = [
]
windows-manifest = ["dep:embed-resource"]
profiler = ["dep:hdrhistogram"]
stacker = ["dep:stacksafe"]

[lib]
path = "src/gpui.rs"
Expand All @@ -64,8 +67,8 @@ image.workspace = true
inventory.workspace = true
itertools.workspace = true
log.workspace = true
num_cpus = "1.13"
parking = "2.0.0"
num_cpus = "1.17"
parking = "2.2.1"
parking_lot.workspace = true
postage.workspace = true
proptest = { workspace = true, optional = true }
Expand All @@ -87,7 +90,7 @@ serde_json.workspace = true
slotmap.workspace = true
smallvec.workspace = true
async-channel.workspace = true
stacksafe.workspace = true
stacksafe = { workspace = true, optional = true }
strum.workspace = true
sum_tree.workspace = true
taffy = "=0.13.0"
Expand All @@ -97,8 +100,8 @@ gpui_util.workspace = true
hdrhistogram = { workspace = true, optional = true }
waker-fn = "1.2.0"
lyon = "1.0"
pin-project = "1.1.10"
spin = "0.10.0"
pin-project = "1.1.13"
spin = "0.10.1"
pollster.workspace = true
url.workspace = true
uuid.workspace = true
Expand Down Expand Up @@ -143,11 +146,15 @@ unicode-segmentation = { workspace = true }
http_client = { workspace = true, features = ["test-support"] }
proptest = { workspace = true }

[target.'cfg(target_family = "wasm")'.dev-dependencies]
wasm-bindgen = { workspace = true }
web-sys = { version = "0.3", features = ["console"] }

[build-dependencies]
embed-resource = { version = "3.0", optional = true }

[target.'cfg(target_os = "macos")'.build-dependencies]
bindgen = "0.71"
bindgen = "0.72"

[package.metadata.cargo-shear]
ignored = [
Expand Down
6 changes: 6 additions & 0 deletions crates/gpui/examples/a11y.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
//! - "2. Run tests"
//! - "3. Ship it"

#[path = "example_support/fonts.rs"]
mod example_support;

use gpui::{
AccessibleAction, App, Bounds, Context, FocusHandle, KeyBinding, Role, SharedString, Toggled,
Window, WindowBounds, WindowOptions, actions, div, prelude::*, px, rgb, size, text,
Expand Down Expand Up @@ -226,6 +229,9 @@ impl Render for A11yDemo {

fn run_example() {
application().run(|cx: &mut App| {
if !example_support::load_fonts(cx) {
return;
}
cx.bind_keys([
KeyBinding::new("tab", Tab, None),
KeyBinding::new("shift-tab", TabPrev, None),
Expand Down
6 changes: 6 additions & 0 deletions crates/gpui/examples/anchor.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg_attr(target_family = "wasm", no_main)]

#[path = "example_support/fonts.rs"]
mod example_support;

use gpui::{
Anchor, AnchoredPositionMode, App, Axis, Bounds, Context, Half as _, InteractiveElement,
ParentElement, Pixels, Point, Render, SharedString, Size, Window, WindowBounds, WindowOptions,
Expand Down Expand Up @@ -168,6 +171,9 @@ impl Render for AnchorDemo {

fn run_example() {
application().run(|cx: &mut App| {
if !example_support::load_fonts(cx) {
return;
}
cx.open_window(
WindowOptions {
window_bounds: Some(WindowBounds::Windowed(Bounds::centered(
Expand Down
6 changes: 6 additions & 0 deletions crates/gpui/examples/animation.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg_attr(target_family = "wasm", no_main)]

#[path = "example_support/fonts.rs"]
mod example_support;

use std::time::Duration;

use anyhow::Result;
Expand Down Expand Up @@ -306,6 +309,9 @@ impl Render for AnimationExample {

fn run_example() {
application().with_assets(Assets {}).run(|cx: &mut App| {
if !example_support::load_fonts(cx) {
return;
}
let options = WindowOptions {
window_bounds: Some(WindowBounds::Windowed(Bounds::centered(
None,
Expand Down
6 changes: 6 additions & 0 deletions crates/gpui/examples/data_table.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg_attr(target_family = "wasm", no_main)]

#[path = "example_support/fonts.rs"]
mod example_support;

use std::{ops::Range, rc::Rc, time::Duration};

use gpui::{
Expand Down Expand Up @@ -451,6 +454,9 @@ impl Render for DataTable {

fn run_example() {
application().run(|cx: &mut App| {
if !example_support::load_fonts(cx) {
return;
}
cx.open_window(
WindowOptions {
focus: true,
Expand Down
6 changes: 6 additions & 0 deletions crates/gpui/examples/drag_drop.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg_attr(target_family = "wasm", no_main)]

#[path = "example_support/fonts.rs"]
mod example_support;

use gpui::{
App, Bounds, Context, Half, Hsla, Pixels, Point, Window, WindowBounds, WindowOptions, div,
prelude::*, px, rgb, size,
Expand Down Expand Up @@ -125,6 +128,9 @@ impl Render for DragDrop {

fn run_example() {
application().run(|cx: &mut App| {
if !example_support::load_fonts(cx) {
return;
}
let bounds = Bounds::centered(None, size(px(800.), px(600.0)), cx);
cx.open_window(
WindowOptions {
Expand Down
44 changes: 44 additions & 0 deletions crates/gpui/examples/example_support/fonts.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#[cfg(target_family = "wasm")]
use std::borrow::Cow;

use gpui::App;

#[cfg(target_family = "wasm")]
pub fn load_fonts(cx: &App) -> bool {
let fonts = [
Cow::Borrowed(
include_bytes!("../../../../assets/fonts/ibm-plex-sans/IBMPlexSans-Regular.ttf")
.as_slice(),
),
Cow::Borrowed(
include_bytes!("../../../../assets/fonts/ibm-plex-sans/IBMPlexSans-Italic.ttf")
.as_slice(),
),
Cow::Borrowed(
include_bytes!("../../../../assets/fonts/ibm-plex-sans/IBMPlexSans-SemiBold.ttf")
.as_slice(),
),
Cow::Borrowed(
include_bytes!("../../../../assets/fonts/ibm-plex-sans/IBMPlexSans-SemiBoldItalic.ttf")
.as_slice(),
),
Cow::Borrowed(
include_bytes!("../../../../assets/fonts/lilex/Lilex-Regular.ttf").as_slice(),
),
Cow::Borrowed(include_bytes!("../../../../assets/fonts/lilex/Lilex-Bold.ttf").as_slice()),
Cow::Borrowed(include_bytes!("../../../../assets/fonts/lilex/Lilex-Italic.ttf").as_slice()),
Cow::Borrowed(
include_bytes!("../../../../assets/fonts/lilex/Lilex-BoldItalic.ttf").as_slice(),
),
];
if let Err(error) = cx.text_system().add_fonts(fonts.into()) {
web_sys::console::error_1(&format!("failed to load application fonts: {error:#}").into());
return false;
}
true
}

#[cfg(not(target_family = "wasm"))]
pub fn load_fonts(_cx: &App) -> bool {
true
}
6 changes: 6 additions & 0 deletions crates/gpui/examples/focus_visible.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg_attr(target_family = "wasm", no_main)]

#[path = "example_support/fonts.rs"]
mod example_support;

use gpui::{
App, Bounds, Context, Div, ElementId, FocusHandle, KeyBinding, SharedString, Stateful, Window,
WindowBounds, WindowOptions, actions, div, prelude::*, px, size,
Expand Down Expand Up @@ -196,6 +199,9 @@ impl Render for Example {

fn run_example() {
application().run(|cx: &mut App| {
if !example_support::load_fonts(cx) {
return;
}
cx.bind_keys([
KeyBinding::new("tab", Tab, None),
KeyBinding::new("shift-tab", TabPrev, None),
Expand Down
6 changes: 6 additions & 0 deletions crates/gpui/examples/gif_viewer.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg_attr(target_family = "wasm", no_main)]

#[path = "example_support/fonts.rs"]
mod example_support;

use gpui::{App, Context, Render, Window, WindowOptions, div, img, prelude::*};
use gpui_platform::application;
use std::path::PathBuf;
Expand Down Expand Up @@ -27,6 +30,9 @@ impl Render for GifViewer {

fn run_example() {
application().run(|cx: &mut App| {
if !example_support::load_fonts(cx) {
return;
}
let gif_path =
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("examples/image/black-cat-typing.gif");

Expand Down
6 changes: 6 additions & 0 deletions crates/gpui/examples/gradient.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg_attr(target_family = "wasm", no_main)]

#[path = "example_support/fonts.rs"]
mod example_support;

use gpui::{
App, Bounds, ColorSpace, Context, Half, Render, Window, WindowOptions, canvas, div,
linear_color_stop, linear_gradient, point, prelude::*, px, size,
Expand Down Expand Up @@ -247,6 +250,9 @@ impl Render for GradientViewer {

fn run_example() {
application().run(|cx: &mut App| {
if !example_support::load_fonts(cx) {
return;
}
cx.open_window(
WindowOptions {
focus: true,
Expand Down
6 changes: 6 additions & 0 deletions crates/gpui/examples/grid_layout.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg_attr(target_family = "wasm", no_main)]

#[path = "example_support/fonts.rs"]
mod example_support;

use gpui::{
App, Bounds, Context, Hsla, Window, WindowBounds, WindowOptions, container_query, div,
prelude::*, px, rgb, size,
Expand Down Expand Up @@ -63,6 +66,9 @@ impl Render for HolyGrailExample {

fn run_example() {
application().run(|cx: &mut App| {
if !example_support::load_fonts(cx) {
return;
}
let bounds = Bounds::centered(None, size(px(500.), px(500.0)), cx);
cx.open_window(
WindowOptions {
Expand Down
6 changes: 6 additions & 0 deletions crates/gpui/examples/hello_world.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg_attr(target_family = "wasm", no_main)]

#[path = "example_support/fonts.rs"]
mod example_support;

use gpui::{
App, Bounds, Context, SharedString, Window, WindowBounds, WindowOptions, div, prelude::*, px,
rgb, size,
Expand Down Expand Up @@ -91,6 +94,9 @@ impl Render for HelloWorld {

fn run_example() {
application().run(|cx: &mut App| {
if !example_support::load_fonts(cx) {
return;
}
let bounds = Bounds::centered(None, size(px(500.), px(500.0)), cx);
cx.open_window(
WindowOptions {
Expand Down
6 changes: 6 additions & 0 deletions crates/gpui/examples/image/image.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg_attr(target_family = "wasm", no_main)]

#[path = "../example_support/fonts.rs"]
mod example_support;

use std::fs;
use std::path::PathBuf;
use std::sync::Arc;
Expand Down Expand Up @@ -157,6 +160,9 @@ fn run_example() {
base: manifest_dir.join("examples"),
})
.run(move |cx: &mut App| {
if !example_support::load_fonts(cx) {
return;
}
cx.activate(true);
cx.on_action(|_: &Quit, cx| cx.quit());
cx.bind_keys([KeyBinding::new("cmd-q", Quit, None)]);
Expand Down
6 changes: 6 additions & 0 deletions crates/gpui/examples/image_gallery.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg_attr(target_family = "wasm", no_main)]

#[path = "example_support/fonts.rs"]
mod example_support;

use futures::FutureExt;
use gpui::{
App, AppContext, Asset as _, AssetLogger, Bounds, ClickEvent, Context, ElementId, Entity,
Expand Down Expand Up @@ -252,6 +255,9 @@ fn run_example() {
let app = gpui_platform::single_threaded_web();

app.run(move |cx: &mut App| {
if !example_support::load_fonts(cx) {
return;
}
cx.activate(true);
cx.on_action(|_: &Quit, cx| cx.quit());
cx.bind_keys([KeyBinding::new("cmd-q", Quit, None)]);
Expand Down
6 changes: 6 additions & 0 deletions crates/gpui/examples/image_loading.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg_attr(target_family = "wasm", no_main)]

#[path = "example_support/fonts.rs"]
mod example_support;

use std::{path::Path, sync::Arc, time::Duration};

use gpui::{
Expand Down Expand Up @@ -196,6 +199,9 @@ impl Render for ImageLoadingExample {

fn run_example() {
application().with_assets(Assets {}).run(|cx: &mut App| {
if !example_support::load_fonts(cx) {
return;
}
let options = WindowOptions {
window_bounds: Some(WindowBounds::Windowed(Bounds::centered(
None,
Expand Down
6 changes: 6 additions & 0 deletions crates/gpui/examples/input.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg_attr(target_family = "wasm", no_main)]

#[path = "example_support/fonts.rs"]
mod example_support;

use std::ops::Range;

use gpui::{
Expand Down Expand Up @@ -696,6 +699,9 @@ impl Render for InputExample {

fn run_example() {
application().run(|cx: &mut App| {
if !example_support::load_fonts(cx) {
return;
}
let bounds = Bounds::centered(None, size(px(300.0), px(300.0)), cx);
cx.bind_keys([
KeyBinding::new("backspace", Backspace, None),
Expand Down
6 changes: 6 additions & 0 deletions crates/gpui/examples/list_example.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![cfg_attr(target_family = "wasm", no_main)]

#[path = "example_support/fonts.rs"]
mod example_support;

use gpui::{
App, Bounds, Context, ListAlignment, ListState, Render, Window, WindowBounds, WindowOptions,
div, list, prelude::*, px, rgb, size,
Expand Down Expand Up @@ -143,6 +146,9 @@ impl Render for BottomListDemo {

fn run_example() {
application().run(|cx: &mut App| {
if !example_support::load_fonts(cx) {
return;
}
let bounds = Bounds::centered(None, size(px(400.), px(500.)), cx);
cx.open_window(
WindowOptions {
Expand Down
Loading