| title | Building Glass for Windows |
|---|---|
| description | Guide to building Glass for Windows development. |
The commands below can be run from PowerShell or Windows Terminal.
Clone the Glass repository.
If you are developing Glass together with a local GPUI checkout, clone Glass-HQ/gpui as a sibling repository:
git clone https://github.com/Glass-HQ/Glass.git
git clone https://github.com/Glass-HQ/gpui.gitThis yields:
C:\src\Glass-HQ\Glass
C:\src\Glass-HQ\gpui
Install:
If you install only Build Tools, launch Glass from a developer shell so MSVC and SDK environment variables are available.
Glass includes a Windows bootstrap script that verifies the machine, installs ninja with winget when needed, stages the CEF runtime into a stable dev directory, builds the companion CLI, and launches the app.
From the repo root:
powershell -ExecutionPolicy Bypass -File .\script\setup-windows-dev.ps1To build and launch Glass in one step:
powershell -ExecutionPolicy Bypass -File .\script\setup-windows-dev.ps1 -RunThis is the intended Windows development entry point.
What the script does:
- verifies
cargoandcmake - installs
ninjafor the current user if it is missing - uses a sibling
..\gpuicheckout automatically when one is present - stages the Windows CEF runtime next to the development build so
zed.execan be launched directly- this step is handled by
script/stage-windows-cef-runtime.ps1
- this step is handled by
- builds
cli.exe, which Glass expects in the Windows dev layout - launches
zed.exedirectly with the staged dev runtime
If you are working with a sibling gpui checkout and want to drive Cargo directly instead of using the bootstrap script, use the PowerShell helper:
powershell -ExecutionPolicy Bypass -File .\script\cargo-gpui-local.ps1 build -p cli
powershell -ExecutionPolicy Bypass -File .\script\cargo-gpui-local.ps1 build -p zed
powershell -ExecutionPolicy Bypass -File .\script\cargo-gpui-local.ps1 run -p zedBuilding cli first ensures zed.exe can find the companion CLI binary in the expected Windows dev layout.
For day-to-day Windows development, prefer the bootstrap script:
powershell -ExecutionPolicy Bypass -File .\script\setup-windows-dev.ps1 -RunIf a build fails in cef-dll-sys with an error saying CMake cannot find Ninja, install it:
winget install --id Ninja-build.Ninja --scope user --accept-package-agreements --accept-source-agreements --silentThen open a new shell and re-run the build.
If you are using the local GPUI helper or the bootstrap script picks up a sibling checkout automatically, Glass will resolve GPUI crates from ..\gpui. In that case you must either:
- clone Glass-HQ/gpui next to the Glass checkout, or
- move back to the pinned GPUI dependency flow once the local GPUI changes are no longer needed
If you set the RUSTFLAGS environment variable, it overrides the rustflags settings in .cargo/config.toml, which Glass needs for Windows builds.
If you need extra Rust flags, prefer adding them in a local .cargo/config.toml instead of exporting RUSTFLAGS.
If dependency checkout paths exceed Windows path limits, enable long path support for both Git and Windows:
git config --system core.longpaths true
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -ForceReboot after enabling Windows long paths.
Glass currently uses the same GPU stack as Zed on Windows. If the app fails to open a window, inspect the log at:
C:\Users\YOU\AppData\Local\Zed\logs\Zed.log
If you see Vulkan or device initialization errors, update GPU drivers first.