Fix Tauri build stack overflow: zip sidecar and extract on first launch
Tauri's build script overflows the stack when processing resource globs
matching thousands of files from PyInstaller's ML output (torch, pyannote).
Instead of bundling the sidecar directory directly:
- CI zips the sidecar output into a single sidecar.zip
- Tauri bundles just the one zip file (no recursion)
- On first launch, Rust extracts the zip to the app data directory
- Versioned extraction dir (sidecar-{version}) ensures updates re-extract
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -39,10 +39,9 @@ jobs:
|
||||
working-directory: python
|
||||
run: uv run --python ${{ env.PYTHON_VERSION }} python build_sidecar.py --cpu-only
|
||||
|
||||
- name: Place sidecar for Tauri
|
||||
- name: Package sidecar for Tauri
|
||||
run: |
|
||||
cp -r python/dist/voice-to-notes-sidecar src-tauri/sidecar
|
||||
chmod +x src-tauri/sidecar/voice-to-notes-sidecar
|
||||
cd python/dist/voice-to-notes-sidecar && zip -r ../../../src-tauri/sidecar.zip .
|
||||
|
||||
# ── Tauri app ──
|
||||
- name: Set up Node.js
|
||||
@@ -64,7 +63,7 @@ jobs:
|
||||
- name: Build Tauri app
|
||||
run: npm run tauri build
|
||||
env:
|
||||
TAURI_CONFIG: '{"bundle":{"resources":["sidecar/**"]}}'
|
||||
TAURI_CONFIG: '{"bundle":{"resources":["sidecar.zip"]}}'
|
||||
|
||||
# ── Release ──
|
||||
- name: Upload to release
|
||||
|
||||
Reference in New Issue
Block a user