ZIm/docs/src/developing_zed__building_zed_windows.md
Nimit Savant bd5473a582
docs: Install Windows 10/11 SDK with VS installation (#10550)
This installation is also needed with VS installation. Only then they
would be able to target the WINDOWS SDK

Optionally, include screenshots / media showcasing your addition that
can be included in the release notes.

I was getting link.exe error before this stating that my MSVC was not
installed properly. But MSVC was perfectly installed. I went on
stackoverflow and checked for similar instances with `cargo run` on
windows and found this

https://stackoverflow.com/a/55603112/12859779

where in comment Fasis states that we need to install WINDOWS 10 SDK. I
had Windos 11 so Installed that and it worked :)

Release Notes:

- N/A
2024-04-18 14:42:20 -07:00

1.9 KiB

Building Zed for Windows

Note

The following commands may be executed in any shell.

Repository

After cloning the repository, ensure all git submodules are initialized:

git submodule update --init --recursive

Dependencies

  • Install Rust. If it's already installed, make sure it's up-to-date:

    rustup update
    
  • Install the Rust wasm toolchain:

    rustup target add wasm32-wasi
    
  • Install Visual Studio with optional component MSVC v*** - VS YYYY C++ x64/x86 build tools and install Windows 11 or 10 SDK depending on your system

Note

v*** is your VS version and YYYY is year when your VS was released.

Backend dependencies

Warning

This section is still in development. The instructions are not yet complete.

If you are developing collaborative features of Zed, you'll need to install the dependencies of zed's collab server:

Alternatively, if you have Docker installed you can bring up all the collab dependencies using Docker Compose:

docker compose up -d

Building 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

Can't compile zed

Before reporting the issue, make sure that you have the latest rustc version with rustup update.

Cargo errors claiming that a dependency is using unstable features

Try cargo clean and cargo build.