actix-svelte-inertia Svelte Themes

Actix Svelte Inertia

Full-stack Rust + TypeScript template with Actix-web, Svelte (Vite), and Inertia.js.

Actix-Svelte-Inertia

Full-stack Rust + TypeScript template with Actix-web, Svelte (Vite), and Inertia.js.

Tech Stack

  • Backend: Rust, Actix-web, Inertia.js
  • Frontend: TypeScript, Svelte, Vite, Inertia.js

Project Structure

.
├── Cargo.toml              # Rust project config
├── justfile                # Task runner commands
├── src/                    # Rust source
│   └── main.rs             # Actix-web server
├── web/                    # Frontend Vite project
│   ├── src/
│   ├── dist/               # Built frontend assets
│   └── package.json
├── target/                 # Rust build output

Commands

Development

just run

Runs Vite dev server and Cargo dev server concurrently. Visit http://localhost:8080 to preview.

Production Build

Build frontend and compile Rust binary:

npm run build --prefix ./web
cargo build --release

Move outputs to output/ folder:

mkdir -p output
mv dist/ output/
mv target/release/server output/

Final structure:

output/
├── dist/           # Frontend assets
└── server          # Rust binary

Run the production server:

./output/server

Environment Variables

  • MODE: Set to development for dev mode (default)
  • VITE_ORIGIN: Vite dev server URL (default: http://localhost:5173)
  • VITE_ENTRY: Vite entry point (default: /src/main.ts)

Top categories

Loading Svelte Themes