Installation
Create a new swift-rust project and run it locally.
Quick Start
- Create a new swift-rust project named
my-app. cd my-appand install the dependencies.- Start the dev server with
bun run dev. - Visit
http://localhost:3210.
bun create swift-rust@latest my-app --yes
cd my-app
bun install
bun run dev--yes skips prompts using saved preferences or defaults. The default setup enables TypeScript, Tailwind CSS, ESLint, App Router, and src, with import alias @/*, and includes AGENTS.md (with a CLAUDE.md that references it) to guide coding agents to write up-to-date swift-rust code.
System Requirements
Before you begin, make sure your development environment meets the following requirements:
- Bun 1.3.0+ (no Node.js)
- Rust 1.85+ (only required for native builds)
- Linux, macOS, or Windows
Supported Browsers
swift-rust supports modern browsers with zero configuration.
- Chrome 111+
- Edge 111+
- Firefox 111+
- Safari 16.4+
- Zen
Scaffold a new project
The fastest way to start is with the create-swift-rust scaffolder. It asks a few questions (or accepts flags for a non-interactive run) and creates a new project in the current directory.
bun create swift-rust@latest my-app
cd my-app
bun install
bun run devOn installation, you'll see the following prompts:
What is your project named? my-app
Would you like to use the recommended swift-rust defaults?
Yes, use recommended defaults - TypeScript, ESLint, Tailwind CSS, App Router, AGENTS.md
No, reuse previous settings
No, customize settings - Choose your own preferencesIf you choose to customize settings, you'll see the following prompts:
Would you like to use TypeScript? No / Yes
Which linter would you like to use? ESLint / Biome / None
Would you like to use React Compiler? No / Yes
Would you like to use Tailwind CSS? No / Yes
Would you like your code inside a `src/` directory? No / Yes
Would you like to use App Router? (recommended) No / Yes
Would you like to customize the import alias (`@/*` by default)? No / Yes
What import alias would you like configured? @/*
Would you like to include AGENTS.md to guide coding agents to write up-to-date swift-rust code? No / YesAfter the prompts, create-swift-rust will create a folder with your project files. Enter that folder and run bun install before starting the development server.
Non-interactive mode
Every prompt can be replaced with a flag. Useful for CI, scripts, or when you know exactly what you want.
bun create swift-rust@latest my-app \
--ts \
--tailwind \
--shadcn \
--renderer ssr-wasm \
--import-alias "@/*" \
--yesProject dependencies
The scaffolder adds these dependencies to the new project's package manifest:
swift-rust— the frameworkreactandreact-dom— for components and pagesclsxandtailwind-merge— for thecn()utility (shadcn only)tailwindcss— for styling (optional)typescript— for type checking (TS only)
Next steps
Continue to Project structure to learn how the file system maps to routes.