Skip to content

feat: scaffold Tauri 2 desktop support (--desktop tauri) - #120

Merged
spencer-osbrjp merged 1 commit into
mainfrom
i117-20260812-1
Aug 12, 2026
Merged

feat: scaffold Tauri 2 desktop support (--desktop tauri)#120
spencer-osbrjp merged 1 commit into
mainfrom
i117-20260812-1

Conversation

@spencer-osbrjp

Copy link
Copy Markdown
Collaborator

Closes #117

Stacked on #119 (needs its copyDir signature; merge #119 first and this PR reduces to the Tauri commit).

What

A new registry-driven desktop category, exposed as --desktop tauri on create and a Desktop panel in the TUI wizard.

  • Scaffolds src-tauri/ next to the frontend: Cargo.toml, build.rs, src/main.rs + src/lib.rs, capabilities/default.json (copied verbatim from create-tauri-app v2, minus the opener plugin we don't scaffold), .gitignore, and a neutral RGBA icon set (generated from an original placeholder via tauri icon — no Tauri trademark assets; the 5 files tauri-build needs at dev + bundle time).
  • tauri.conf.json is templated per project: devUrl on the pinned dev port 3000, beforeDevCommand/beforeBuildCommand from the package manager, frontendDist from the base's output dir, and a sanitized identifier/crate name (desktopSlug handles dots, underscores, spaces, unicode — and the .app-suffix and com.tauri.dev identifier rules).
  • All 7 bases supported. Nuxt switches to SSG when tauri is selected (ssr: false + builds via generate — note: this also makes the same project's web deploy SPA output, intentional). Vite bases get clearScreen: false + a src-tauri watch-ignore.
  • Monorepo: src-tauri/ and the tauri script/CLI land in apps/web; README/AGENTS document the pnpm --filter web tauri dev form.
  • bump now scans the desktop category so @tauri-apps/cli stays on the pinned-channel freshness policy.

Testing

go test ./... green: three new scaffold-render cases (astro-react, nuxt SSG, monorepo) under the existing no-template-residue/valid-JSON invariants, TestTauriIconsRGBA (square + RGBA PNGs straight from the embedded FS), slug/identifier tables, package.json placement incl. monorepo, and a bump case pinning the desktop category. E2E smoke: scaffolded vite-react --desktop taurisrc-tauri/ complete, conf wired to pnpm run dev / ../dist.

Running tauri dev/tauri build needs a local Rust toolchain (documented in the generated README); not exercised in CI.

Follow-ups noted during review (pre-existing, not widened into this PR)

  • BumpRegistry also misses Backend/ORM/Database categories
  • BaseFramework.GetIntegration has an inverted nil check; IsVueInt compares against "react"

🤖 Generated with Claude Code

New registry-driven "desktop" category exposed as --desktop tauri on create
and a Desktop panel in the TUI. Scaffolds src-tauri/ (Cargo.toml,
tauri.conf.json wired to the base's dev server and dist output, capabilities,
neutral RGBA icon set) around any of the 7 bases; nuxt switches to SSG
(ssr: false + generate). bump now scans the desktop category so the
@tauri-apps/cli pin stays fresh.

Closes #117

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@spencer-osbrjp
spencer-osbrjp merged commit d093eab into main Aug 12, 2026
2 checks passed
@spencer-osbrjp
spencer-osbrjp deleted the i117-20260812-1 branch August 12, 2026 14:37
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.

feat: Tauri desktop app scaffolding

1 participant