Add Tauri v2 desktop wrapper with Rust SQLite backend and Windows MSI CI#1
Draft
Copilot wants to merge 2 commits into
Draft
Add Tauri v2 desktop wrapper with Rust SQLite backend and Windows MSI CI#1Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/crazyrob425/KDP-E-Book-Generator/sessions/c1184aff-4831-4ecb-a697-e79461fa6cb9 Co-authored-by: crazyrob425 <247058665+crazyrob425@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add full Tauri v2 desktop wrapper to KDP-E-Book-Generator
Add Tauri v2 desktop wrapper with Rust SQLite backend and Windows MSI CI
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wraps the existing Vite+React+TS app in a Tauri v2 desktop shell with a Rust-only backend (bundled SQLite, background job runner, progress events) and a GitHub Actions pipeline that produces a downloadable Windows MSI artifact.
Rust backend (
src-tauri/)Cargo.toml: addedrusqlite(bundled),tokio,thiserror,uuidsrc/lib.rs: full backend replacing the stub —projects,project_notes,project_text_fts(FTS5 virtual table), WAL modeget_app_paths,sqlite_status,start_demo_jobstart_demo_jobspawns a Tokio task emittingjob_progress(percent/stage/message) andjob_doneevents; cleans up the active-job list on completiontauri.conf.json: product nameBinary Books E-Crafter, identifiercom.binarybooks.ecrafter, window 1280×800, bundle target narrowed tomsiwith WiXen-USTypeScript bridge (
src/tauri/backend.ts) — newTyped wrappers over
@tauri-apps/api:CI (
.github/workflows/build-windows.yml) — newmainandworkflow_dispatchwindows-latestrunner; caches~/.cargo+src-tauri/targetkeyed onCargo.locknpm ci→npm run tauri:build→ uploads*.msias artifactwindows-msiREADME
Added Desktop App (Tauri v2) section: prerequisites table (Rust, Node, WebView2, VS Build Tools),
npm run tauri:devquickstart, and CI artifact download steps.Original prompt
Add a full Tauri v2 desktop wrapper to the fork crazyrob425/KDP-E-Book-Generator (base branch main), matching the existing Vite+React+TypeScript app structure and keeping UI changes minimal.
Requirements:
src-tauri/scaffold for Tauri v2:Cargo.toml,src/main.rs,tauri.conf.json,build.rs, and required manifest files.projects,project_notes, and an FTS5 virtual table for full-text search.job_progress,job_done).get_app_paths,sqlite_status,start_demo_job(or equivalent) callable from frontend.@tauri-apps/apithat wraps the commands and event listeners.package.jsonto include Tauri scripts and add@tauri-apps/cliand@tauri-apps/api(v2) as devDependencies.README.mdwith:npm run tauri:dev.Constraints:
Deliverable: Open a PR against
mainincrazyrob425/KDP-E-Book-Generatorwith all changes, passing CI where applicable.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: os: windows | name: Binary Books E-Crafter | method: upload
Assistant: Below is a ready-to-upload Tauri wrapper (Rust-only backend) that wraps your existing Vite/React app and adds:
src-tauri/scaffoldtauri.conf.json)src/tauri/backend.ts)You chose method: upload, so you will:
npm installnpm run tauri dev1) Add/Update
package.jsonAdd these scripts and devDependencies. Keep your existing deps as-is; just merge in the new parts.
{ "name": "fraudrob's-ai-book-factory", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "preview": "vite preview", "tauri": "tauri", "tauri:dev": "tauri dev", "tauri:build": "tauri build" }, "dependencies": { "react-dom": "^19.2.0", "@google/genai": "^1.28.0", "react": "^19.2.0", "jszip": "3.10.1", "epub-gen-es": "1.0.1", "fabric": "^6.9.0", "express": "^5.1.0", "http": "^0.0.1-security", "ws": "^8.18.3", "playwright": "^1.56.1", "fs": "^0.0.1-security", "path": "^0.12.7", "os": "^0.1.2", "buffer": "^6.0.3" }, "devDependencies": { "@types/node": "^22.14.0", "@vitejs/plugin-react": "^5.0.0", "typescript": "~5.8.2", "vite": "^6.2.0", "@tauri-apps/api": "^2.0.0", "@tauri-apps/cli": "^2.0.0" } }If you prefer, you can add the Tauri deps without changing anything else.
2) Create
src-tauri/(entire folder)2.1
src-tauri/Cargo.toml2.2
src-tauri/build.rs2.3
src-tauri/tauri.conf.jsonThis points Tauri at your Vite dev server and build output (
dist). If your Vite build output differs, adjustfrontendDist.{ "productName": "Binary Books E-Crafter", "version": "0.1.0", "identifier": "com.binarybooks.ecrafter", ... </details> <!-- START COPILOT CODING AGENT SUFFIX --> *This pull request was created from Copilot chat.* > <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.