Fix Tauri build stack overflow: zip sidecar and extract on first launch
All checks were successful
Build macOS / Build (macOS) (push) Successful in 3m50s
Build Linux / Build (Linux) (push) Successful in 8m3s
Build Windows / Build (Windows) (push) Successful in 9m8s

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:
Claude
2026-03-21 07:12:22 -07:00
parent 12869e3757
commit 462a4b80f6
6 changed files with 118 additions and 42 deletions

View File

@@ -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
@@ -65,7 +64,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

View File

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

View File

@@ -43,10 +43,10 @@ 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
shell: powershell
run: |
Copy-Item -Path python\dist\voice-to-notes-sidecar -Destination src-tauri\sidecar -Recurse -Force
Compress-Archive -Path python\dist\voice-to-notes-sidecar\* -DestinationPath src-tauri\sidecar.zip
# ── Tauri app ──
- name: Set up Node.js
@@ -73,7 +73,7 @@ jobs:
shell: powershell
run: npm run tauri build
env:
TAURI_CONFIG: '{"bundle":{"resources":["sidecar/**"]}}'
TAURI_CONFIG: '{"bundle":{"resources":["sidecar.zip"]}}'
# ── Release ──
- name: Upload to release