chore: optimize exe size in release mode

This commit is contained in:
daimond113 2024-11-17 23:02:54 +01:00
parent c5d60549c9
commit 4866559025
No known key found for this signature in database
GPG key ID: 3A8ECE51328B513C
2 changed files with 11 additions and 2 deletions

View file

@ -96,6 +96,12 @@ members = ["registry"]
[profile.dev.package.full_moon] [profile.dev.package.full_moon]
opt-level = 3 opt-level = 3
[profile.release]
opt-level = "s"
lto = true
incremental = true
codegen-units = 1
[profile.release.package.pesde-registry] [profile.release.package.pesde-registry]
# add debug symbols for Sentry stack traces # add debug symbols for Sentry stack traces
debug = "full" debug = "full"

View file

@ -4,7 +4,7 @@ use fs_err::tokio as fs;
use futures::StreamExt; use futures::StreamExt;
use indicatif::MultiProgress; use indicatif::MultiProgress;
use pesde::{ use pesde::{
lockfile::{DownloadedGraph, Lockfile}, lockfile::Lockfile,
manifest::target::TargetKind, manifest::target::TargetKind,
names::{PackageName, PackageNames}, names::{PackageName, PackageNames},
source::{version_id::VersionId, workspace::specifier::VersionTypeOrReq}, source::{version_id::VersionId, workspace::specifier::VersionTypeOrReq},
@ -124,7 +124,10 @@ impl<V: FromStr<Err = E>, E: Into<anyhow::Error>, N: FromStr<Err = F>, F: Into<a
impl VersionedPackageName { impl VersionedPackageName {
#[cfg(feature = "patches")] #[cfg(feature = "patches")]
fn get(self, graph: &DownloadedGraph) -> anyhow::Result<(PackageNames, VersionId)> { fn get(
self,
graph: &pesde::lockfile::DownloadedGraph,
) -> anyhow::Result<(PackageNames, VersionId)> {
let version_id = match self.1 { let version_id = match self.1 {
Some(version) => version, Some(version) => version,
None => { None => {