Skip to main content

gpui_mobile/
lib.rs

1//! # GPUI Mobile — Mobile platform support for GPUI
2//!
3//! `gpui-mobile` provides iOS and Android platform implementations for
4//! [GPUI](https://github.com/zed-industries/zed), the GPU-accelerated UI
5//! framework from the Zed editor.
6//!
7//! ## Status
8//!
9//! This crate is in early development. The full platform implementations
10//! (iOS via Metal/UIKit, Android via Vulkan/NDK) depend on upstream Zed
11//! crates (`gpui`, `gpui_wgpu`) that are not yet published on crates.io.
12//!
13//! This initial release reserves the crate name and exposes the
14//! platform-independent **momentum scrolling** engine, which can be used
15//! standalone.
16//!
17//! Once the upstream dependencies are available on crates.io, this crate
18//! will be updated to include the full `Platform` trait implementations
19//! for both iOS and Android.
20//!
21//! ## Momentum Scrolling
22//!
23//! The [`momentum`] module provides:
24//!
25//! - [`VelocityTracker`](momentum::VelocityTracker) — records recent touch
26//!   positions and computes release velocity using weighted least-squares
27//!   estimation.
28//! - [`MomentumScroller`](momentum::MomentumScroller) — takes a release
29//!   velocity and produces a stream of decelerating scroll deltas, matching
30//!   native iOS `UIScrollView` / Android `OverScroller` feel.
31//!
32//! ## Full Feature Set (coming soon)
33//!
34//! The complete crate provides:
35//!
36//! - **Full `gpui::Platform` implementation** for iOS and Android
37//! - **GPU-accelerated rendering** via Metal (iOS) and Vulkan/GL (Android)
38//! - **Touch input** with tap-vs-scroll state machine
39//! - **Momentum scrolling** with native-feel deceleration
40//! - **Emoji rendering** with bundled CBDT bitmap emoji font for Android
41//! - **Keyboard input** — hardware and software keyboard support
42//! - **Safe area insets** — notch / home indicator / status bar awareness
43//! - **Dark mode** — responds to system appearance changes
44//!
45//! ## Repository
46//!
47//! Full source code, examples, and build instructions:
48//! <https://github.com/itsbalamurali/gpui-mobile>
49
50pub mod momentum;