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
30## Backend Dependencies
31
32# Note: This section is still in development. The instructions are not yet complete.
33
34If you are developing collaborative features of Zed, you'll need to install the dependencies of zed's `collab` server:
35
36- Install [Postgres](https://www.postgresql.org/download/linux/)
37- Install [Livekit](https://github.com/livekit/livekit-cli) and [Foreman](https://theforeman.org/manuals/3.9/quickstart_guide.html)
38
39Alternatively, if you have [Docker](https://www.docker.com/) installed you can bring up all the `collab` dependencies using Docker Compose:
40
41```sh
42docker compose up -d
43```
44
45## Building Zed from Source
46
47Once you have the dependencies installed, you can build Zed using [Cargo](https://doc.rust-lang.org/cargo/).
48
49For a debug build:
50
51```
52cargo run
53```
54
55For a release build:
56
57```
58cargo run --release
59```
60
61And to run the tests:
62
63```
64cargo test --workspace
65```
66
67## Troubleshooting
68
69### Cargo errors claiming that a dependency is using unstable features
70
71Try `cargo clean` and `cargo build`.