Compare commits

..

3 Commits

Author SHA1 Message Date
spinline
48221b039e fix: build stabilitesi için wasm-opt ve bulk-memory ayarları geri alındı
All checks were successful
Build MIPS Binary / build (push) Successful in 4m52s
2026-02-08 17:37:21 +03:00
spinline
60354b66d1 fix: rustflags sadece wasm32 hedefine özel hale getirilerek uyarılar temizlendi
Some checks failed
Build MIPS Binary / build (push) Failing after 1m2s
2026-02-08 17:31:31 +03:00
spinline
0433406288 perf: WASM boyutunu minimize etmek için agresif profil ayarları ve Brotli eklendi
Some checks failed
Build MIPS Binary / build (push) Failing after 1m14s
2026-02-08 17:29:19 +03:00
4 changed files with 22 additions and 21 deletions

View File

@@ -29,26 +29,16 @@ jobs:
# Run Tailwind manually first
npx @tailwindcss/cli -i input.css -o public/tailwind.css
trunk build --release
# Manuel WASM Optimizasyonu
WASM_FILE=$(ls dist/*.wasm | head -n 1)
BEFORE=$(du -h "$WASM_FILE" | cut -f1)
echo "Before optimization: $BEFORE"
wasm-opt --all-features -Oz "$WASM_FILE" -o "$WASM_FILE"
AFTER=$(du -h "$WASM_FILE" | cut -f1)
echo "After optimization: $AFTER"
echo "Optimization complete!"
- name: Build Backend (MIPS)
env:
# -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"
# 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"
CFLAGS_mips_unknown_linux_musl: "-msoft-float"
run: |
# 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
cd backend
cargo zigbuild --target mips-unknown-linux-musl --release -Z build-std=std,panic_abort
file target/mips-unknown-linux-musl/release/backend
- name: Rename Binary

View File

@@ -5,11 +5,10 @@ resolver = "2"
# Optimize for size (aggressive)
[profile.release]
opt-level = "z"
lto = "fat" # Full LTO (En iyisi)
lto = true
codegen-units = 1
panic = "abort"
strip = "symbols" # Sembolleri temizle
incremental = false # Incremental build'i kapat (Boyut için daha iyi)
strip = true
[patch.crates-io]
coarsetime = { path = "third_party/coarsetime" }

View File

@@ -516,9 +516,9 @@ async fn main() {
.layer(TraceLayer::new_for_http())
.layer(
CompressionLayer::new()
.br(false)
.br(true)
.gzip(true)
.quality(CompressionLevel::Fastest),
.quality(CompressionLevel::Best),
)
.layer(
ServiceBuilder::new()

View File

@@ -51,4 +51,16 @@ web-sys = { version = "0.3", features = [
] }
shared = { path = "../shared" }
tailwind_fuse = "0.3.2"
js-sys = "0.3.85"
js-sys = "0.3.85"
[profile.release]
# En yüksek seviyede boyut optimizasyonu
opt-level = "z"
# Tüm kütüphaneler arasında link-time optimizasyonu yapar (Çok etkilidir)
lto = true
# Kod üretim birimini 1'e düşürerek daha iyi optimizasyon sağlar
codegen-units = 1
# Hata durumunda stack unwinding yerine doğrudan durur (Kod boyutunu düşürür)
panic = "abort"
# Sembolleri ve debug bilgilerini siler
strip = true