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 @@ - +