Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
24 changes: 23 additions & 1 deletion .zed/tasks.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Project tasks — Alt+T opens the picker (see keymap: task::Spawn)
//
// The check/clippy/test tasks set CARGO_TARGET_DIR so they don't invalidate what
// `cargo run` and rust-analyzer built. See CLAUDE.md ▸ Commands.
// `cargo run` and rust-analyzer built. The "(nix)" tasks supply GPUI's Linux libraries through
// `nix/devshell.nix`; with direnv and nix-direnv, the plain tasks work on Linux too.
[
{
"label": "cargo run (app)",
Expand Down Expand Up @@ -31,6 +32,27 @@
"label": "CI (fmt + clippy + test)",
"command": "./scripts/ci.sh"
},
{
"label": "cargo run (nix)",
"command": "nix-shell --run 'cargo run -p app'",
"reveal": "always",
"use_new_terminal": false
},
{
"label": "cargo test (nix)",
"command": "nix-shell --run 'CARGO_TARGET_DIR=target/ci cargo test --workspace'"
},
{
"label": "CI checks (nix)",
"command": "nix-shell --run './scripts/ci.sh'",
"reveal": "always"
},
{
"label": "nix dev shell",
"command": "nix-shell",
"reveal": "always",
"use_new_terminal": true
},
{
"label": "lazygit",
"command": "lazygit"
Expand Down
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ executable** first and then on the system. A checkout without them builds, launc
./scripts/fetch-binaries.sh target/release # before building an installer
```

On Windows, use `./scripts/fetch-binaries.ps1` from PowerShell.

Consequence for tests: `preview`'s PDF and media tests assert *behaviour that depends on what is
installed*. With the binary present they require a real render; without it they require a clean
decline. Both directions are real assertions — if a test says "skipping", that is the no-binary
Expand Down
11 changes: 10 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@ cargo run

The first build downloads Rust dependencies. The [`sample/`](sample) directory contains a sample collection and images for local testing. qrate builds and runs without optional preview binaries; PDF and video preview coverage needs the tools described in [the development setup guide](docs/dev/SETUP.md).

Linux contributors also need the system libraries listed in [`.github/workflows/ci.yml`](.github/workflows/ci.yml). Google Sheets sign-in is optional for local development and needs local credentials; setup details are in [the development setup guide](docs/dev/SETUP.md).
Linux contributors also need the system libraries listed in [`.github/workflows/ci.yml`](.github/workflows/ci.yml). GPUI links `fontconfig`, `freetype`, `alsa-lib` and `openssl` through `pkg-config` at build time, and `dlopen`s `libxkbcommon`, `wayland`, `vulkan-loader`, `libGL` and the X11 client libraries at run time — a build that links cleanly still fails to start without the second group. Without `pkg-config` on `PATH` the build stops in `yeslogic-fontconfig-sys`.

On NixOS, or with Nix installed anywhere, the shell in this repository supplies all of that and sets `LD_LIBRARY_PATH` so `cargo run` works:

```sh
nix develop # flake, pins nixpkgs through flake.lock
nix-shell # same shell without flakes, using your own channel
```

Both read [`nix/devshell.nix`](nix/devshell.nix), so they cannot drift apart. Google Sheets sign-in is optional for local development and needs local credentials; setup details are in [the development setup guide](docs/dev/SETUP.md).

## Make a contribution

Expand Down
Loading