From 40be58f2fcfc8f31e9efd4f31e08bc86bf03ca02 Mon Sep 17 00:00:00 2001 From: spinline Date: Sun, 8 Feb 2026 18:10:09 +0300 Subject: [PATCH] =?UTF-8?q?perf:=20backend=20derleme=20s=C3=BCreci=20k?= =?UTF-8?q?=C3=B6k=20dizine=20ta=C5=9F=C4=B1narak=20workspace=20optimizasy?= =?UTF-8?q?onlar=C4=B1=20aktif=20edildi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build-mips.yml | 9 ++++----- Cargo.toml | 5 +++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/build-mips.yml b/.gitea/workflows/build-mips.yml index 83f2312..a6d5956 100644 --- a/.gitea/workflows/build-mips.yml +++ b/.gitea/workflows/build-mips.yml @@ -43,13 +43,12 @@ jobs: - name: Build Backend (MIPS) env: - # Ensure we are building a fully static binary - # -C link-self-contained=no: Let Zig (the linker) handle CRT objects (crt1.o, etc.) - RUSTFLAGS: "-C target-feature=+crt-static -C link-self-contained=no -C link-arg=-msoft-float" + # -s: Sembolleri siler, -w: DWARF debug bilgilerini siler (Binary boyutunu devasa düşürür) + RUSTFLAGS: "-C target-feature=+crt-static -C link-self-contained=no -C link-arg=-msoft-float -C link-arg=-s -C link-arg=-w" CFLAGS_mips_unknown_linux_musl: "-msoft-float" run: | - cd backend - cargo zigbuild --target mips-unknown-linux-musl --release -Z build-std=std,panic_abort + # Kök dizinden derleyerek workspace profil ayarlarının (LTO, z, strip) uygulanmasını sağlıyoruz + cargo zigbuild -p backend --target mips-unknown-linux-musl --release -Z build-std=std,panic_abort file target/mips-unknown-linux-musl/release/backend - name: Rename Binary diff --git a/Cargo.toml b/Cargo.toml index b27a4d2..5be3782 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,10 +5,11 @@ resolver = "2" # Optimize for size (aggressive) [profile.release] opt-level = "z" -lto = true +lto = "fat" # Full LTO (En iyisi) codegen-units = 1 panic = "abort" -strip = true +strip = "symbols" # Sembolleri temizle +incremental = false # Incremental build'i kapat (Boyut için daha iyi) [patch.crates-io] coarsetime = { path = "third_party/coarsetime" }