Introduction

Swift Rust is a full-stack React framework powered with Rust + Bun that combines the developer experience of Next.js with the performance and safety of Rust. Write your app in TSX, render with a Rust core, and ship a single statically-linked binary — 10x faster than Next.js.

What you'll build

This is a complete framework, not a renderer. It includes routing, layouts, data fetching, image and font optimization, video embeds, PDF generation, error handling, metadata, code splitting, and a CLI for scaffolding and adding components.

Why a new framework?

We love Next.js's developer experience — the file-based routing, the layout system, the data fetching primitives. But we wanted to ship a single binary with no Node.js runtime, and we wanted to keep the option of full-WASM SPAs without a different framework. Swift Rust is the result.

Key features

  • Four rendering modes: pure SSR, SSR with WASM hydration, SSR with HTMX, and full WASM SPAs.
  • 2,071 Google fonts with automatic subsetting and size-adjust fallbacks.
  • Image component with AVIF/WebP, responsive srcset, and lazy loading.
  • Video component with HTML5, YouTube, Vimeo, lightbox, and background video modes.
  • PDF component with declarative <Document>, <Page>, <Text>, <View>.
  • 35 shadcn-style components added with one CLI command: swift-rust-ui add button card input.
  • Single binary deploy: swift-rust build produces one statically-linked Linux binary.

Next steps

Continue to Installation to scaffold your first project.