Desktop Packaging
Turn a project into a standalone desktop window or a distributable app. Three supported methods: Edge/Chrome --app launcher, Electron, Tauri. The method is a user decision — never pick silently.
Compare the methods
| | Edge/Chrome --app | Electron | Tauri | |---|---|---|---| | Deliverable | .bat/.vbs launcher scripts | installer / portable build | small installer (.exe/.msi) | | Footprint | 0 (reuses installed browser) | ~200MB+ bundled Chromium | ~5-15MB, uses system WebView2 | | Runtime prerequisite | Chromium browser | none (self-contained) | WebView2 (preinstalled on Win10/11) | | Build prerequisite | none | Node.js | Node.js + Rust toolchain | | Capabilities | clean chromeless window | tray, native menus, auto-update, offline | tray, native window, offline | | Best for | personal/internal tools, fastest win | public cross-platform distribution | public distribution with small size |
Workflow
1. Assess the app
Find out before asking anything:
- Entry: how does the app run today — static files, or a local server (Node/Python)? What URL/port?
- Distribution: who gets it — only you, colleagues on Windows, or public users on multiple OS?
- Capabilities: does it need system tray, native menus, notifications, offline?
Done when: you can state the entry command/URL and the distribution audience.
2. Ask the user which method (required)
Use the question tool with these three options; put the recommended option first with a "(Recommended)" suffix:
- Recommend Edge --app when: Windows-only, audience already has a browser, zero build tooling wanted, or the project already follows this pattern (launcher + local server).
- Recommend Electron when: public distribution, needs tray/auto-update/native menus, or multiple OS targets.
- Recommend Tauri when: public distribution but small binary matters and installing a Rust toolchain is acceptable.
Done when: the user explicitly picked one method. Do not proceed on assumption.
3. Follow the branch reference
| Picked | Reference |
|---|---|
| Edge/Chrome --app | references/edge-app.md |
| Electron | references/electron.md |
| Tauri | references/tauri.md |
Done when: all implementation steps in the chosen reference are complete.
4. Verify
- edge-app: double-click the launcher → chromeless window opens at the URL; for server-backed apps the server starts and the window appears; a second run does not duplicate the server. Deliberately wrong browser path once → a visible error popup, never silent failure.
- electron:
npm startopens the window; the reference's build command produces an artifact. - tauri:
npm run tauri devopens the native window;npm run tauri buildproduces the installer bundle.
Done when: the chosen verification passes and you report the artifact path or launch-test result to the user.

微信扫一扫