Files
Ely-GPUI-Components/frontend/src/docs/installation.md
T
ZacharyZhang-NY 49ed1f8405
CI / crate (push) Failing after 2s
CI / site (push) Successful in 30s
CI / platforms (ubuntu-24.04) (push) Failing after 1m48s
CI / platforms (macos-15-intel) (push) Canceled after 0s
CI / platforms (ubuntu-24.04-arm) (push) Canceled after 0s
CI / platforms (windows-11-arm) (push) Canceled after 0s
CI / platforms (windows-latest) (push) Failing after 15s
Site and gallery: the repo and the showcase catalog live on Gitea at git.zacharyzhang.com
Links, the header's Gitea mark, the catalog's archive download and the showcase pin
workflow (Gitea's API and commit status) move off GitHub; pinned at 6973834, which
restores TokenLedger.
2026-10-09 16:20:32 -04:00

2.4 KiB

Installation

Requirements

  • Rust 1.95 or later, the version Ely's Cargo.toml names.
  • macOS, where Ely is tested. Windows and Linux builds are not tested yet.
  • No full Xcode: GPUI compiles its Metal shaders at run time.

Add the dependencies

Ely is not on crates.io. Depend on it by git, with GPUI at the snapshot Ely pins. gpui-pre republishes Zed's GPUI on crates.io, and GPUI Kit pins the same one:

[dependencies]
ely-gpui-component = { git = "https://git.zacharyzhang.com/ZacharyZhang-NY/Ely-GPUI-Components" }
gpui = { package = "gpui-pre", version = "=0.3.8" }
gpui_platform = { package = "gpui-pre-platform", version = "=0.3.8", features = ["font-kit"] }
Line Why
ely-gpui-component The library. Cargo.lock records the commit; add rev = "<commit>" to hold it in Cargo.toml as well.
gpui The same snapshot as Ely's, under the name gpui. Another builds a second GPUI, and its types do not match the ones Ely takes.
gpui_platform Opens windows on each platform. Without font-kit, macOS falls back to GPUI's no-op text system and draws no text.

Shaders

Ely's default feature, runtime_shaders, turns on the same feature in gpui_platform, so GPUI compiles its Metal shaders at run time. With default-features = false the build runs xcrun metal instead, which needs Xcode's Metal compiler.

Check the install

Copy the first window into src/main.rs and run it:

cargo run

A window opens with a counter and a Press button. From a clone of the repository, cargo run --example gallery opens every chapter.

When it fails

Symptom Cause and fix
init error: ely: the asset source lacks N of Ely's files, first <path>: <reason> The app's source cannot load every file Ely bundles. Pass Assets, or Assets::before(yours) when the app has a source of its own.
init error: ely: embedded fonts failed to register GPUI's text system refused Ely's fonts. File a bug with the log.
Windows open with no text on macOS gpui_platform lacks the font-kit feature.
mismatched types, with the note there are multiple different versions of crate `gpui` in the dependency graph gpui names another snapshot or a git source. Use gpui-pre at =0.3.8.
metal shader compilation failed Default features are off and Xcode's Metal compiler is missing. Keep runtime_shaders.