https://github.com/zed-industries/zed
Building Zed for macOS
Repository
Clone down the Zed repository.
Dependencies
-
Install rustup
-
Install Xcode from the macOS App Store, or from the Apple Developer website. Note this requires a developer account.
Ensure you launch Xcode after installing, and install the macOS components, which is the default option.
-
Install Xcode command line tools
xcode-select --install
-
Ensure that the Xcode command line tools are using your newly installed copy of Xcode:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer sudo xcodebuild -license accept
-
Install
cmake
(required by a dependency)brew install cmake
Backend Dependencies (optional) {#backend-dependencies}
If you are looking to develop Zed collaboration features using a local collaboration server, please see: Local Collaboration docs.
Building Zed from Source
Once you have the dependencies installed, you can build Zed using Cargo.
For a debug build:
cargo run
For a release build:
cargo run --release
And to run the tests:
cargo test --workspace
Troubleshooting
Error compiling metal shaders
error: failed to run custom build command for gpui v0.1.0 (/Users/path/to/zed)`** xcrun: error: unable to find utility "metal", not a developer tool or in PATH
Try sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
If you're on macOS 26, try xcodebuild -downloadComponent MetalToolchain
Cargo errors claiming that a dependency is using unstable features
Try cargo clean
and cargo build
.
下载