freebsd.md

 1# Building Zed for FreeBSD
 2
 3Note, FreeBSD is not currently a supported platform, and so this is a work-in-progress.
 4
 5## Repository
 6
 7Clone the [Zed repository](https://github.com/zed-industries/zed).
 8
 9## Dependencies
10
11- Install the necessary system packages and rustup:
12
13  ```sh
14  script/freebsd
15  ```
16
17  If preferred, you can inspect [`script/freebsd`](https://github.com/zed-industries/zed/blob/main/script/freebsd) and perform the steps manually.
18
19## Building from source
20
21Once the dependencies are installed, you can build Zed using [Cargo](https://doc.rust-lang.org/cargo/).
22
23For a debug build of the editor:
24
25```sh
26cargo run
27```
28
29And to run the tests:
30
31```sh
32cargo test --workspace
33```
34
35In release mode, the primary user interface is the `cli` crate. You can run it in development with:
36
37```sh
38cargo run -p cli
39```
40
41### WebRTC Notice
42
43Currently, building `webrtc-sys` on FreeBSD fails due to missing upstream support and unavailable prebuilt binaries. As a result, some collaboration features (audio calls and screensharing) that depend on WebRTC are temporarily disabled.
44
45See [Issue #15309: FreeBSD Support] and [Discussion #29550: Unofficial FreeBSD port for Zed] for more.
46
47## Troubleshooting
48
49### Cargo errors claiming that a dependency is using unstable features
50
51Try `cargo clean` and `cargo build`.