developing_zed__building_zed_linux.md

 1# Building Zed for Linux
 2
 3## Repository
 4
 5After cloning the repository, ensure all git submodules are initialized:
 6
 7```shell
 8git submodule update --init --recursive
 9```
10
11## Dependencies
12
13- Install [Rust](https://www.rust-lang.org/tools/install)
14
15- Install the Rust wasm toolchain:
16
17  ```bash
18  rustup target add wasm32-wasi
19  ```
20
21- Install the necessary system libraries:
22
23  ```bash
24  script/linux
25  ```
26
27  - If you prefer to install the system libraries manually, you can find the list of required packages in the `script/linux` file.
28
29## Backend Dependencies
30
31# Note: 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/linux/)
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 Zed 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### Cargo errors claiming that a dependency is using unstable features
69
70Try `cargo clean` and `cargo build`.