# Eliminate assets crate \(\#2575\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/17560cc5b00f6c6f694445a09cda388c9478447f)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 17560cc5b00f6c6f694445a09cda388c9478447f

Requested commit: 17560cc5b00f6c6f694445a09cda388c9478447f

Commit: 17560cc5b00f6c6f694445a09cda388c9478447f

Tree: 27d5ce94945ce0ef69f2c67a0452d6eb9e8ccac5

Author: Max Brunsfeld

Committer: GitHub

## Message

```
Eliminate assets crate (#2575)

Previously, all static assets were embedded into Zed using a single
`RustEmbed` struct called `Assets`, which was in a crate of its own,
also called `assets`. Many crates depended on this crate. The problem
with this situation was that changing *any* static asset file caused
almost every crate in the codebase to need recompilation (because of
recursive dependencies on `assets`).

Now, most of the assets are embedded only into the top-level `zed`
crate. A few assets (such as settings JSON files and AI prompts) are
needed in lower-level crates such as `settings` and `ai`. For these,
I've created separate `RustEmbed` structs in those specific crates,
which embed those specific sub-folders of `assets`.

The result is that now, when you change a theme file, the only crate
that needs to recompile is `zed`.

Release Notes:

- N/A
```

## Parents

- [2003d3dbe4d5e11384439322592c2158ac51585b](https://git.cafe/gitcafe/zed/commit/2003d3dbe4d5e11384439322592c2158ac51585b?format=markdown)

- [dbbd0558c38fa8ef09e995c5ed75b93951cb2cad](https://git.cafe/gitcafe/zed/commit/dbbd0558c38fa8ef09e995c5ed75b93951cb2cad?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/17560cc5b00f6c6f694445a09cda388c9478447f?format=markdown)
