From 5c7cec9f85373673f55f66c6a70460bdad037ae5 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Tue, 20 Feb 2024 12:02:51 -0800 Subject: [PATCH] Add linux to readme (#8083) Release Notes: - N/A --- Cargo.lock | 2 +- README.md | 3 +- .../src/developing_zed__building_zed_linux.md | 71 +++++++++++++++++++ ... => developing_zed__building_zed_macos.md} | 0 4 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 docs/src/developing_zed__building_zed_linux.md rename docs/src/{developing_zed__building_zed.md => developing_zed__building_zed_macos.md} (100%) diff --git a/Cargo.lock b/Cargo.lock index 1125f84052..98c39f56b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10327,7 +10327,7 @@ dependencies = [ [[package]] name = "tree-sitter-nu" version = "0.0.1" -source = "git+https://github.com/nushell/tree-sitter-nu?rev=26bbaecda0039df4067861ab38ea8ea169f7f5aa#26bbaecda0039df4067861ab38ea8ea169f7f5aa" +source = "git+https://github.com/nushell/tree-sitter-nu?rev=7dd29f9616822e5fc259f5b4ae6c4ded9a71a132#7dd29f9616822e5fc259f5b4ae6c4ded9a71a132" dependencies = [ "cc", "tree-sitter", diff --git a/README.md b/README.md index ba3f3d7d66..ba2e2c9598 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,8 @@ brew install zed ## Developing Zed -- [Building Zed](./docs/src/developing_zed__building_zed.md) +- [Building Zed for macOS](./docs/src/developing_zed__building_zed_macos.md) +- [Building Zed for Linux](./docs/src/developing_zed__building_zed_linux.md) - [Running Collaboration Locally](./docs/src/developing_zed__local_collaboration.md) ## Contributing diff --git a/docs/src/developing_zed__building_zed_linux.md b/docs/src/developing_zed__building_zed_linux.md new file mode 100644 index 0000000000..d0d12c11a8 --- /dev/null +++ b/docs/src/developing_zed__building_zed_linux.md @@ -0,0 +1,71 @@ +# Building Zed + +## Repository + +After cloning the repository, ensure all git submodules are initialized: + +```shell +git submodule update --init --recursive +``` + +## Dependencies + +- Install [Rust](https://www.rust-lang.org/tools/install) + +- Install the Rust wasm toolchain: + + ```bash + rustup target add wasm32-wasi + ``` + +- Install the necessary system libraries: + + ```bash + script/linux + ``` + + - If you prefer to install the system libraries manually, you can find the list of required packages in the `script/linux` file. + + +## Backend Dependencies + +# Note: This section is still in development. The instructions are not yet complete. + +If you are developing collaborative features of Zed, you'll need to install the dependencies of zed's `collab` server: + +- Install [Postgres](https://www.postgresql.org/download/linux/) +- Install [Livekit](https://github.com/livekit/livekit-cli) and [Foreman](https://theforeman.org/manuals/3.9/quickstart_guide.html) + +Alternatively, if you have [Docker](https://www.docker.com/) installed you can bring up all the `collab` dependencies using Docker Compose: + +```sh +docker compose up -d +``` + +## Building Zed from Source + +Once you have the dependencies installed, you can build Zed using [Cargo](https://doc.rust-lang.org/cargo/). + +For a debug build: + +``` +cargo run +``` + +For a release build: + +``` +cargo run --release +``` + +And to run the tests: + +``` +cargo test --workspace +``` + +## Troubleshooting + +### Cargo errors claiming that a dependency is using unstable features + +Try `cargo clean` and `cargo build`. diff --git a/docs/src/developing_zed__building_zed.md b/docs/src/developing_zed__building_zed_macos.md similarity index 100% rename from docs/src/developing_zed__building_zed.md rename to docs/src/developing_zed__building_zed_macos.md