Detailed changes
@@ -292,6 +292,15 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16"
+[[package]]
+name = "assets"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "gpui",
+ "rust-embed",
+]
+
[[package]]
name = "assistant"
version = "0.1.0"
@@ -9529,6 +9538,7 @@ dependencies = [
"activity_indicator",
"ai",
"anyhow",
+ "assets",
"assistant",
"async-compression",
"async-recursion 0.3.2",
@@ -1,5 +1,6 @@
[workspace]
members = [
+ "crates/assets",
"crates/activity_indicator",
"crates/ai",
"crates/assistant",
@@ -0,0 +1,11 @@
+[package]
+name = "assets"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
+gpui = {path = "../gpui"}
+rust-embed.workspace = true
+anyhow.workspace = true
@@ -1,3 +1,4 @@
+// This crate was essentially pulled out verbatim from main `zed` crate to avoid having to run RustEmbed macro whenever zed has to be rebuilt. It saves a second or two on an incremental build.
use anyhow::anyhow;
use gpui::{AssetSource, Result, SharedString};
@@ -74,6 +74,7 @@ vim = { path = "../vim" }
workspace = { path = "../workspace" }
welcome = { path = "../welcome" }
zed_actions = {path = "../zed_actions"}
+assets = {path = "../assets"}
anyhow.workspace = true
async-compression.workspace = true
async-tar = "0.4.2"
@@ -16,6 +16,7 @@ use isahc::{prelude::Configurable, Request};
use language::LanguageRegistry;
use log::LevelFilter;
+use assets::Assets;
use node_runtime::RealNodeRuntime;
use parking_lot::Mutex;
use serde::{Deserialize, Serialize};
@@ -49,8 +50,8 @@ use welcome::{show_welcome_view, BaseKeymap, FIRST_OPEN};
use workspace::{AppState, WorkspaceStore};
use zed::{
app_menus, build_window_options, ensure_only_instance, handle_cli_connection,
- handle_keymap_file_changes, initialize_workspace, languages, Assets, IsOnlyInstance,
- OpenListener, OpenRequest,
+ handle_keymap_file_changes, initialize_workspace, languages, IsOnlyInstance, OpenListener,
+ OpenRequest,
};
fn main() {
@@ -1,11 +1,9 @@
mod app_menus;
-mod assets;
pub mod languages;
mod only_instance;
mod open_listener;
pub use app_menus::*;
-pub use assets::*;
use assistant::AssistantPanel;
use breadcrumbs::Breadcrumbs;
use collections::VecDeque;
@@ -18,6 +16,7 @@ pub use only_instance::*;
pub use open_listener::*;
use anyhow::{anyhow, Context as _};
+use assets::Assets;
use futures::{channel::mpsc, select_biased, StreamExt};
use project_panel::ProjectPanel;
use quick_action_bar::QuickActionBar;