perf: manuel WASM optimizasyonu eklendi ve build süreci stabilize edildi
Some checks failed
Build MIPS Binary / build (push) Failing after 1m2s
Some checks failed
Build MIPS Binary / build (push) Failing after 1m2s
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
[build]
|
||||
rustflags = ["-C", "target-feature=-bulk-memory"]
|
||||
|
||||
[target.wasm32-unknown-unknown]
|
||||
rustflags = ["-C", "target-feature=-bulk-memory"]
|
||||
@@ -30,6 +30,13 @@ jobs:
|
||||
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:
|
||||
# Ensure we are building a fully static binary
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
[target.wasm32-unknown-unknown]
|
||||
rustflags = ["-C", "target-feature=+bulk-memory"]
|
||||
@@ -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
|
||||
@@ -21,7 +21,7 @@
|
||||
<link rel="apple-touch-icon" sizes="512x512" href="icon-512.png" />
|
||||
|
||||
<!-- Trunk Assets -->
|
||||
<link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="z" />
|
||||
<link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="0" />
|
||||
<link data-trunk rel="css" href="public/tailwind.css" />
|
||||
<link data-trunk rel="copy-file" href="manifest.json" />
|
||||
<link data-trunk rel="copy-file" href="icon-192.png" />
|
||||
|
||||
Reference in New Issue
Block a user