Development Environment Setup
This guide covers setting up your development environment to build Glass from source.Prerequisites
Required Tools
- Git - For cloning the repository
- Rust toolchain - Install via rustup
- Platform-specific dependencies - See platform sections below
Platform-Specific Setup
- macOS
- Linux
- Windows
macOS Dependencies
Install Xcode
Download from the macOS App Store or Apple Developer (requires developer account).Launch Xcode after installation and install the macOS components.
Speed Optimizations
If you build frequently, macOS may keep verifying new builds, adding seconds to each iteration:- Run
sudo spctl developer-mode enable-terminal - In System Settings, search for “Developer Tools”
- Add your terminal (iTerm, Ghostty, etc.) to “Allow applications to use developer tools”
- Restart your terminal
Clone the Repository
Glass is a fork of Zed. All branches and PRs must target
Glass-HQ/Glass, never the upstream zed-industries/zed repo.Building Glass
Debug Build
Run Glass in debug mode:Release Build
Build and run an optimized release version:Running Tests
Run the full test suite:Installing a Development Build
- macOS
- Linux
- Windows
Glass doesn’t have a dedicated install script for macOS yet. You can run the built binary directly from
target/release/zed or create a symlink.Understanding the Codebase
Glass is made up of several crates:gpui- GPU-accelerated UI framework providing all building blocks for Glasseditor- CoreEditortype driving code editor and input fieldsproject- File management and navigation within the filetreeworkspace- Local state serialization, groups projects togetherlsp- Communication with external LSP serverslanguage- Language understanding (symbols, syntax maps)collab- Collaboration server for project sharingrpc- Message definitions for collaboration servertheme- Theme system and default themesui- Collection of UI components and common patternscli- CLI crate invoking the Glass binaryzed- Main entry point where everything comes together
Build Tools
Code Quality
Use the custom clippy script instead ofcargo clippy:
Visual Regression Tests (macOS only)
Glass includes visual regression tests that capture screenshots and compare against baselines:Grant Screen Recording permission
System Settings > Privacy & Security > Screen RecordingEnable your terminal app (Terminal.app, iTerm2, Ghostty). Restart your terminal.
Troubleshooting
Cargo errors: unstable features
Cargo errors: unstable features
Try cleaning and rebuilding:
macOS: Error compiling metal shaders
macOS: Error compiling metal shaders
Configure Xcode tools:On macOS 15+:
macOS: dispatch/dispatch.h not found
macOS: dispatch/dispatch.h not found
Install and configure Xcode command line tools:
Windows: RUSTFLAGS breaks builds
Windows: RUSTFLAGS breaks builds
Don’t set the
RUSTFLAGS environment variable - it overrides required settings in .cargo/config.toml.Add custom flags to .cargo/config.toml instead (see Windows setup section).Windows: STATUS_ACCESS_VIOLATION
Windows: STATUS_ACCESS_VIOLATION
This can happen with the rust-lld.exe linker. Try a different linker configuration in
.cargo/config.toml.Next Steps
Contribution Guidelines
Learn our code standards and contribution workflow