Electron → Tauri migration notes¶
Electron remains in electron/ and package.json electron:* / dist:*
scripts until a platform installer has demonstrated parity. The Tauri
production bundle does not ship Electron, node-pty, or electron-builder.
Feature map¶
| Electron | Tauri |
|---|---|
electron/main.cjs loopback static server |
Webview loads Vite devUrl or frontendDist |
Proxy /api/dtam\|agents\|mri to fixed ports |
Supervisor gateway; frontend uses injected base_url |
node-pty + preload.cjs |
Rust portable-pty; same window.adelphaTerminal shape |
adelphaApp.quit |
invoke('app_quit') then sidecar shutdown |
Camera NSCameraUsageDescription |
bundle.macOS.infoPlist |
Window 1440×900, min 1024×700, #050505 |
Same in src-tauri/tauri.conf.json |
| electron-builder dmg/nsis/AppImage/deb | Tauri bundle targets dmg, nsis, appimage, deb |
org.adelpha.digital-twin-ui |
Same identifier |
Intentionally not copied¶
- Unrestricted
shell.openExternalfor arbitrary URLs still uses the webview default; typed commands do not exposeshell.execute. - Electron’s GPU command-line switches have no Tauri equivalent; WebView defaults apply.
asarUnpack/afterPack.cjsfornode-ptyare Electron-only.
Frontend¶
src/desktop/runtime.ts detects Tauri via __TAURI_INTERNALS__. Browser Vite
and Electron keep relative /api/* URLs. Tauri prefixes the supervisor origin
and sends Authorization: Bearer <session>.
Removing Electron¶
After a signed-off installer smoke test on each OS:
- Delete
electron/, electron-builderbuildkey,electron/electron-builder/node-ptydependencies. - Remove
postinstall:electron-builder install-app-deps. - Drop
electron:*anddist:*scripts. - Rewrite README badges that still mention Electron.