Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

chore: Merge zed lib with zed binary.

Piotr Osiewicz080e25dd4531
diff --git a/Cargo.toml b/Cargo.toml
index 421485ee480..1dc3c6cbfd7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -389,6 +389,9 @@ debug = "limited"
lto = "thin"
codegen-units = 1
+[profile.release.package]
+zed = { codegen-units = 16 }
+
[workspace.lints.clippy]
dbg_macro = "deny"
todo = "deny"
diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml
index a70dd0172d1..90af8ecda50 100644
--- a/crates/zed/Cargo.toml
+++ b/crates/zed/Cargo.toml
@@ -10,11 +10,6 @@ authors = ["Zed Team <[email protected]>"]
[lints]
workspace = true
-[lib]
-name = "zed"
-path = "src/zed.rs"
-doctest = false
-
[[bin]]
name = "Zed"
path = "src/main.rs"
diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs
index d1f927dfd07..f222a850b2f 100644
--- a/crates/zed/src/main.rs
+++ b/crates/zed/src/main.rs
@@ -1,6 +1,8 @@
// Allow binary to be called Zed for a nice application menu when running executable directly
#![allow(non_snake_case)]
+mod zed;
+
use anyhow::{anyhow, Context as _, Result};
use backtrace::Backtrace;
use chrono::Utc;
diff --git a/crates/zed/src/app_menus.rs b/crates/zed/src/zed/app_menus.rs
similarity index 97%
rename from crates/zed/src/app_menus.rs
rename to crates/zed/src/zed/app_menus.rs
index e42612c302c..fb06f4dcc5b 100644
--- a/crates/zed/src/app_menus.rs
+++ b/crates/zed/src/zed/app_menus.rs
@@ -165,20 +165,20 @@ pub fn app_menus() -> Vec<Menu<'static>> {
Menu {
name: "Help",
items: vec![
- MenuItem::action("View Telemetry", crate::OpenTelemetryLog),
- MenuItem::action("View Dependency Licenses", crate::OpenLicenses),
+ MenuItem::action("View Telemetry", super::OpenTelemetryLog),
+ MenuItem::action("View Dependency Licenses", super::OpenLicenses),
MenuItem::action("Show Welcome", workspace::Welcome),
MenuItem::action("Give Feedback...", feedback::GiveFeedback),
MenuItem::separator(),
MenuItem::action(
"Documentation",
- crate::OpenBrowser {
+ super::OpenBrowser {
url: "https://zed.dev/docs".into(),
},
),
MenuItem::action(
"Zed Twitter",
- crate::OpenBrowser {
+ super::OpenBrowser {
url: "https://twitter.com/zeddotdev".into(),
},
),
diff --git a/crates/zed/src/only_instance.rs b/crates/zed/src/zed/only_instance.rs
similarity index 100%
rename from crates/zed/src/only_instance.rs
rename to crates/zed/src/zed/only_instance.rs
diff --git a/crates/zed/src/open_listener.rs b/crates/zed/src/zed/open_listener.rs
similarity index 100%
rename from crates/zed/src/open_listener.rs
rename to crates/zed/src/zed/open_listener.rs