This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.
This repo supports:
- Desktop app: Tauri v2 (Rust) + Vue 3 (Vite)
- Web app (B/S): Vue 3 (Vite) calling a standalone Axum server over HTTP
The Rust business logic is shared in crates/core. Tauri commands and Axum handlers are just adapters.
crates/core: shared business logic + shared request/response typescrates/server: Axum HTTP server (/api/*)crates/desktop: desktop adapter (pure Rust, used bysrc-tauricommand wrappers)
npm install
npm run app:devStart backend:
# default: 127.0.0.1:3001
npm run server:dev
# or customize listen address
SLOTH_SERVER_ADDR=127.0.0.1:3001 cargo run -p sloth-serverStart frontend (separately hosted):
# point the frontend to the Axum API base
VITE_API_BASE_URL=http://127.0.0.1:3001 npm run devIf VITE_API_BASE_URL is not set, the frontend defaults to http://127.0.0.1:3001.
POST /api/greet- request:
{ "name": "..." } - response:
{ "message": "..." }
- request: