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