Skip to content

Migration to Tauri#11

Merged
Sytronik merged 118 commits intomainfrom
tauri
Jan 3, 2026
Merged

Migration to Tauri#11
Sytronik merged 118 commits intomainfrom
tauri

Conversation

@Sytronik
Copy link
Owner

@Sytronik Sytronik commented Dec 29, 2025

Motivation

  1. Electron renderer process w/ node integration doesn't work with Web Workers well.
    • We need multi-threaded wav rendering.
  2. Tauri is designed for Rust backend.
  3. Tauri has small binary size & fast start-up time.

Caveats & To-dos

  • Tauri uses system webviews. We need to handle OS-Webview dependency.
  • Tauri's IPC functions are async. It makes React codes complicated.
    • It'd be better to move some backend functions to wasm module. (especially functions repetitively called in a short period)
    • We might need to refactor frontend by gathering most of the BackendAPI call to a new hook / context provider / ... to avoid triggering too many re-rendering by too many Promise.then(setSomeState).
  • Tauri's IPC is slower than calling n-api function in the same thread.
    • In the main branch, backend returns sliced spectrogram. It is problematic with tauri's IPC w/ JSON serde.
      • We also need to move spectrogram mipmap code to wasm module.
  • (Pros) Tauri backend can emit events to the frontend.
    • We can refactor some backend functions. e.g., get_player_state

This PR covers

  • The same behaviour as the main branch w/ Tauri on macOS, Windows
  • Ensuring smooth wav & spectrogram rendering
    • powered by multi-threading w/ Web Worker + WASM
  • Merging main branch and fix-front-for-windows branch
    • We need to handle more OS compatibility issues with Tauri.
    • We can solve those issues while solving the issues that fix-front-for-windows branch handles at the same time.
  • Avoiding other refactoring that doesn't change user's experience dramatically
    • e.g., gathering BackendAPI call to a new module, emitting events from backend to alert player state

we don't need simple_logger because tauri_devtools initializes logger
This reverts commit 1e20325f1b7fa56bc7c6aee1eb6749f98ee0ee92.
…use of cors)"

This reverts commit 44dc99749389dabe0db8fca0a070f9b1b11a1bad.
TODO
0. caching the smallest mipmap
1. drawing spec with the smallest mipmap or the existing one while wasm-renderer is resizing new one
2. reducing memory copy
3. remove backend code related to resizing / saving mipmaps
@Sytronik Sytronik force-pushed the tauri branch 2 times, most recently from 7d6127f to 71448ec Compare December 31, 2025 08:06
@Sytronik Sytronik force-pushed the tauri branch 2 times, most recently from af7c0ab to e1d19fa Compare January 1, 2026 13:13
@Sytronik Sytronik merged commit 6dc4440 into main Jan 3, 2026
5 of 10 checks passed
@Sytronik Sytronik deleted the tauri branch January 3, 2026 06:11
@Sytronik Sytronik changed the title [WIP] Migration to Tauri Migration to Tauri Jan 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant