windows.md

 1# Building Zed for Windows
 2
 3> [!NOTE]
 4> The following commands may be executed in any shell.
 5
 6## Repository
 7
 8Clone down the [Zed repository](https://github.com/zed-industries/zed).
 9
10## Dependencies
11
12- Install [Rust](https://www.rust-lang.org/tools/install). If it's already installed, make sure it's up-to-date:
13
14  ```bash
15  rustup update
16  ```
17
18- Install the Rust wasm toolchain:
19
20  ```bash
21  rustup target add wasm32-wasi
22  ```
23
24- Install [Visual Studio](https://visualstudio.microsoft.com/downloads/) with optional component `MSVC v*** - VS YYYY C++ x64/x86 build tools` and install Windows 11 or 10 SDK depending on your system
25
26> [!NOTE] > `v***` is your VS version and `YYYY` is year when your VS was released.
27
28## Backend dependencies
29
30> [!WARNING]
31> This section is still in development. The instructions are not yet complete.
32
33If you are developing collaborative features of Zed, you'll need to install the dependencies of zed's `collab` server:
34
35- Install [Postgres](https://www.postgresql.org/download/windows/)
36- Install [Livekit](https://github.com/livekit/livekit-cli) and [Foreman](https://theforeman.org/manuals/3.9/quickstart_guide.html)
37
38Alternatively, if you have [Docker](https://www.docker.com/) installed you can bring up all the `collab` dependencies using Docker Compose:
39
40```sh
41docker compose up -d
42```
43
44## Building from source
45
46Once you have the dependencies installed, you can build Zed using [Cargo](https://doc.rust-lang.org/cargo/).
47
48For a debug build:
49
50```
51cargo run
52```
53
54For a release build:
55
56```
57cargo run --release
58```
59
60And to run the tests:
61
62```
63cargo test --workspace
64```
65
66## Troubleshooting
67
68### Can't compile zed
69
70Before reporting the issue, make sure that you have the latest rustc version with `rustup update`.
71
72### Cargo errors claiming that a dependency is using unstable features
73
74Try `cargo clean` and `cargo build`.