Skip to content

Commit e67cc74

Browse files
JSKittyclaude
andcommitted
perf: trim zip features, optimize frontend minification, fix Windows CI
- zip: disable default features, use only deflate-zlib (drops 11 crates: zopfli, zstd, bzip2, lzma, deflate64, xz2 — unused since we only read WebXDC archives, never write them) - terser: passes 3, pure_getters, toplevel mangle (49.7% reduction, +4%) - CI: shorten CARGO_TARGET_DIR on Windows to avoid MAX_PATH limit in whisper.cpp's Vulkan shader generator CMake ExternalProject build Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3e46e3b commit e67cc74

4 files changed

Lines changed: 23 additions & 124 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ jobs:
8484
Write-Host "Verifying glslc..."
8585
& "$vcpkgBin\glslc.exe" --version
8686
87+
- name: Shorten cargo target dir (Windows)
88+
if: matrix.platform == 'windows-latest'
89+
shell: pwsh
90+
run: echo "CARGO_TARGET_DIR=C:\cargo-target" >> $env:GITHUB_ENV
91+
8792
- name: install frontend dependencies
8893
run: npm install
8994

scripts/build-frontend.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,12 @@ async function minifyJs(filePath) {
7070
compress: {
7171
dead_code: true,
7272
drop_console: false, // keep console.log for debugging in production
73-
passes: 2,
73+
passes: 3,
74+
pure_getters: true,
75+
},
76+
mangle: {
77+
toplevel: true,
7478
},
75-
mangle: true,
7679
format: {
7780
comments: false,
7881
},

src-tauri/Cargo.lock

Lines changed: 12 additions & 121 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ rayon = "1.11.0"
6363
memmap2 = "0.9"
6464

6565
# Mini Apps (WebXDC) support
66-
zip = "2.4"
66+
zip = { version = "2.4", default-features = false, features = ["deflate-zlib"] }
6767
toml = "0.8.23"
6868
anyhow = "1.0.99"
6969
http = "1.3"

0 commit comments

Comments
 (0)