Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
gpui-libghostty
Native Ghostty terminal and embedded Neovim components for GPUI.
Demo
Embedded Neovim editing this project's README with completion:
https://github.com/user-attachments/assets/140e3552-1074-4994-b91d-d0966fe623c9
Status
Project status is alpha, expect bugs and instability.
Crates
Published on crates.io: gpui-libghostty and gpui-neovim. Add either to your project:
gpui-libghosttyembeds a native Ghostty terminal in GPUI.gpui-neovimembeds Neovim in GPUI.
Supports macOS and Linux with Wayland.
Requirements
- Rust 1.95
- macOS and Xcode command-line tools, or Wayland with EGL, libc++ 21 or newer, libxml2, and desktop OpenGL 4.3
- Zig 0.16
- Neovim for
gpui-neovim
The default Nix development shell provides the Rust tools, Zig, Neovim, and
the required Linux build and runtime libraries. macOS still requires Xcode
command-line tools because the native build uses xcrun.
On Ubuntu 24.04, install libc++-21-dev and libc++abi-21-dev from
LLVM's APT repository, plus libxml2-dev from Ubuntu.
Set ZIG to select a non-default Zig executable. Set GPUI_NVIM or assign
NvimOptions::executable to select Neovim.
Terminal
[]
= "0.2"
use ;
let terminal = spawn?;
Terminal::spawn returns an Entity<Terminal> you can render as a GPUI child.
To load the user's Ghostty configuration:
use TerminalConfiguration;
let mut options = new;
options.configuration = UserDefault;
Clipboard approval
Clipboard operations requiring approval are denied unless clipboard_approval
accepts them. Explicit Ghostty allow/deny settings still apply.
use Arc;
use ClipboardOperation;
// Example application policy: permit writes that Ghostty asks to confirm,
// but deny protected reads and unsafe pastes.
options.clipboard_approval = Some;
NvimOptions::clipboard_approval exposes the same policy for embedded Neovim.
Neovim
use ;
let editor = spawn?;
let editor = cx.new;
Call and await NvimEditor::open_file through the entity to reuse the running
Neovim instance.
Run the standalone example from this repository:
The optional argument is a file or directory. The example uses your Neovim
configuration; install nvim on PATH or set GPUI_NVIM to its executable.
Checks
Versioning
GPUI is pinned to Zed commit cc053a4a6fa2fd0e8793201ed9099466af1be0b1.
Consumers using another GPUI source should patch that dependency consistently
so entity and event types remain identical.
License
The workspace is MIT-licensed. Vendored Ghostty remains MIT-licensed; see
crates/gpui-ghostty/vendor/ghostty/LICENSE and
crates/gpui-ghostty/vendor/ghostty/VENDOR.md.