- macOS (required for the Metal compiler toolchain)
- Rust (to build from source)
- Zed or VS Code
- Bun (only for building the VS Code extension)
Both editor extensions auto-install metal-analyzer on macOS by
downloading the latest signed GitHub Release asset when metal-analyzer
is not already in your PATH.
If you prefer a manual global install:
cargo install --path crates/metal-analyzerEnsure that ~/.cargo/bin is in your PATH. Verify installation:
metal-analyzer --version- Open Zed.
- Press
Cmd+Shift+Pto open the command palette. - Type and select "zed: install dev extension".
- Navigate to the
editors/zedfolder in this repository and select it.
You can install the extension locally from this repository as a .vsix package.
- Build the extension package:
cd editors/code
bun install
bun run compile
bun run package-
Install the generated
.vsixin VS Code:- Open VS Code
- Press
Cmd+Shift+P - Run Extensions: Install from VSIX...
- Select the generated
.vsixfile ineditors/code
-
Restart VS Code and open a
.metalfile.
- If packaging fails due to dependency resolution issues, reinstall deps and re-run packaging:
rm -rf editors/code/node_modulescd editors/code && bun install && bun run package
- If
.metalfiles showC/C++diagnostics in VS Code, remove conflicting associations such as"files.associations": { "*.metal": "cpp" }and keep language mode set toMetal. Seeeditors/code/README.mdfor diagnostics source guidance.