diff --git a/Cargo.toml b/Cargo.toml index 421485ee48..1dc3c6cbfd 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 a70dd0172d..90af8ecda5 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -10,11 +10,6 @@ authors = ["Zed Team "] [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 d1f927dfd0..f222a850b2 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 e42612c302..fb06f4dcc5 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 { 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