
Leptos
A Rust framework for building fast web apps that run in the browser, on the server, or both.
- Stars
- 21.5k
- Forks
- 923
- Licence
- MIT
- Language
- Rust
- Last update
- 5 days ago
- Type
- Library
What it is
Leptos is a web framework written in Rust for building interactive websites and web apps. It can render pages in the browser, on a server, or on the server with interactivity added in the browser, and it includes a reactive system that updates only the parts of the page that change. It also lets server-only code, such as database calls, sit next to the UI code that uses it without a separate API layer.
- Build a counter or form-driven UI with reactive signals and the view! macro
- Write server functions that the browser calls like normal functions
- Render pages on the server and stream data and HTML with Suspense
- Create a full-stack app using the cargo-leptos starter templates for Axum or Actix
Great for
- Rust developers who want to build full web apps in one language
- Teams that want server-side rendering with browser interactivity in Rust
- Developers who want fine-grained updates instead of a virtual DOM
- People already comfortable with Rust's compiler and type system
Not ideal for
- Beginners who are new to programming, since Rust has a steep learning curve
- Projects that need a mature, long-established ecosystem, since the README describes the project as still having bugs and missing features
- Teams that need a stable release today, since the latest release is a release candidate (v0.9.0-rc0) with no binaries
How to get it
- 1
Install with a package manager
You'll need: Rust toolchain (via rustup) · cargo-leptos
Install the cargo-leptos build tool
cargo install cargo-leptos --lockedCreate a new project from the Axum starter template
cargo leptos new --git https://github.com/leptos-rs/start-axumEnter the project folder
cd [your project name]Start the dev server with live rebuilds
cargo leptos watch - 2
Run it
- Install cargo-leptos with cargo install cargo-leptos --locked
- Create a project from the start-axum template with cargo leptos new
- Change into the project folder
- Run cargo leptos watch and open http://localhost:3000/ in a browser
- 3
Get the most out of it
- Read the Book and API docs on docs.rs for the reactive primitives and view! macro
- Browse the examples folder in the repo, such as js-framework-benchmark and hackernews_js_fetch
- Use the awesome-leptos list for libraries and example projects
- Check the README's notes on getrandom and rand setup if you compile to wasm and use randomness
- Use the Discord or Matrix channels listed in the README for help
Downloads
Strengths
- Fine-grained reactivity updates individual DOM nodes without re-running whole components, according to the README
- Supports client-side, server-side, and hydrated rendering in one framework
- Server functions let client and server code share one codebase without a separate REST API
Trade-offs
- Requires learning Rust, and the README notes the project has bugs that may take time to fix at the framework level
- Latest release is a release candidate, and the README says the author expects no major breaking changes but gives no formal stability guarantee
- Documentation is described as a work in progress in the README
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| leptos (this) | 21.5k | Library | advanced | 5 days ago | Rust developers who want to build full web apps in one language |
| solid | 36.2k | Library | intermediate | 4 days ago | Developers who want fine-grained control over what re-renders in a web UI |
| marko | 14.5k | Framework | intermediate | 6 days ago | JavaScript developers who prefer HTML-style templates over JSX |
| preact | 39k | Library | intermediate | 4 days ago | Web developers who already know React and want a lighter library |
| html2canvas | 31.9k | Library | beginner | 2.3 years ago | Front-end developers who want to let users save or export part of a page as an image |
| react-loadable | 16.5k | Library | intermediate | 2.3 years ago | React developers whose main JavaScript bundle has grown large |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.