From e72113d91db0a6bfe0021a389fe6c3cd7267cb40 Mon Sep 17 00:00:00 2001 From: spinline Date: Sun, 8 Feb 2026 17:54:43 +0300 Subject: [PATCH] =?UTF-8?q?perf:=20manuel=20WASM=20optimizasyonu=20eklendi?= =?UTF-8?q?=20ve=20build=20s=C3=BCreci=20stabilize=20edildi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cargo/config.toml | 5 ----- .gitea/workflows/build-mips.yml | 7 +++++++ frontend/.cargo/config.toml | 2 -- frontend/Cargo.toml | 7 +++++++ frontend/index.html | 2 +- 5 files changed, 15 insertions(+), 8 deletions(-) delete mode 100644 .cargo/config.toml delete mode 100644 frontend/.cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index a6baea0..0000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,5 +0,0 @@ -[build] -rustflags = ["-C", "target-feature=-bulk-memory"] - -[target.wasm32-unknown-unknown] -rustflags = ["-C", "target-feature=-bulk-memory"] \ No newline at end of file diff --git a/.gitea/workflows/build-mips.yml b/.gitea/workflows/build-mips.yml index 38589e4..903dcbe 100644 --- a/.gitea/workflows/build-mips.yml +++ b/.gitea/workflows/build-mips.yml @@ -29,6 +29,13 @@ jobs: # Run Tailwind manually first npx @tailwindcss/cli -i input.css -o public/tailwind.css trunk build --release + + # Manuel WASM Optimizasyonu (Trunk'ın yapamadığını biz yapıyoruz) + # bulk-memory ve diğer modern özellikleri destekleyerek en küçük boyutu elde ediyoruz. + WASM_FILE=$(ls dist/*.wasm) + echo "Optimizing $WASM_FILE..." + wasm-opt --enable-bulk-memory --enable-mutable-globals --enable-sign-ext -Oz "$WASM_FILE" -o "$WASM_FILE" + echo "Optimization complete!" - name: Build Backend (MIPS) env: diff --git a/frontend/.cargo/config.toml b/frontend/.cargo/config.toml deleted file mode 100644 index 51f5802..0000000 --- a/frontend/.cargo/config.toml +++ /dev/null @@ -1,2 +0,0 @@ -[target.wasm32-unknown-unknown] -rustflags = ["-C", "target-feature=+bulk-memory"] \ No newline at end of file diff --git a/frontend/Cargo.toml b/frontend/Cargo.toml index 96c2a1b..94e43c1 100644 --- a/frontend/Cargo.toml +++ b/frontend/Cargo.toml @@ -52,3 +52,10 @@ web-sys = { version = "0.3", features = [ shared = { path = "../shared" } tailwind_fuse = "0.3.2" js-sys = "0.3.85" + +[profile.release] +opt-level = "z" +lto = true +codegen-units = 1 +panic = "abort" +strip = true \ No newline at end of file diff --git a/frontend/index.html b/frontend/index.html index 93e1d8b..bdb5353 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -21,7 +21,7 @@ - +