zed/crates/server
Nathan Sobo a1412166f0 Fix randomized test failures by waiting for client_b to be added to worktree_a
We perform an async fetch of client_b's user data on worktree_a, which ends up holding a handle that prevents worktree_a from being released later in the test. By waiting for this fetch to finish before proceeding, we can be sure worktree_a actually gets released.

A more comprehensive fix would be some way to ensure we actually perform a release if an entity is fully dropped outside of an update cycle, but this fixes the issue for now.

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-11-29 16:48:09 -07:00
..
k8s Move all crates to a top-level crates folder 2021-10-04 13:22:21 -06:00
migrations Move all crates to a top-level crates folder 2021-10-04 13:22:21 -06:00
src Fix randomized test failures by waiting for client_b to be added to worktree_a 2021-11-29 16:48:09 -07:00
static Fix paths to server crate in scripts and gitignore 2021-11-03 19:22:00 -07:00
templates Move all crates to a top-level crates folder 2021-10-04 13:22:21 -06:00
.env.template.toml Move all crates to a top-level crates folder 2021-10-04 13:22:21 -06:00
.env.toml Move all crates to a top-level crates folder 2021-10-04 13:22:21 -06:00
basic.conf Move all crates to a top-level crates folder 2021-10-04 13:22:21 -06:00
Cargo.toml Introduce a collections crate w/ deterministic hashmap, hashset in tests 2021-11-29 15:22:45 -08:00
favicon.ico Move all crates to a top-level crates folder 2021-10-04 13:22:21 -06:00
Procfile Move all crates to a top-level crates folder 2021-10-04 13:22:21 -06:00
README.md Move all crates to a top-level crates folder 2021-10-04 13:22:21 -06:00
styles.css Move all crates to a top-level crates folder 2021-10-04 13:22:21 -06:00

Zed Server

This crate is what we run at https://zed.dev.

It contains our web presence as well as the backend logic for collaboration, to which we connect from the Zed client via a websocket.

Templates

We use handlebars templates that are interpreted at runtime. When running in debug mode, you can change templates and see the latest content without restarting the server. This is enabled by the rust-embed crate, which we use to access the contents of the /templates folder at runtime. In debug mode it reads contents from the file system, but in release the templates will be embedded in the server binary.

Static assets

We also use rust-embed to access the contents of the /static folder via the /static/* route. The app will pick up changes to the contents of this folder when running in debug mode.

CSS

This site uses Tailwind CSS, which means our stylesheets don't need to change very frequently. We check static/styles.css into the repository, but it's actually compiled from /styles.css via script/build-css. This script runs the Tailwind compilation flow to regenerate static/styles.css via PostCSS.