Skip to content
@leptos-rs

Leptos

Leptos Logo

crates.io docs.rs Discord Matrix

Leptos

Leptos is a fine grained, reactive, full-stack web framework for building fast and interactive web applications in Rust. It leverages fine-grained reactivity to offer a highly efficient and modern development experience, drawing inspiration from frameworks like SolidJS, and Sycamore.

Key Features:

  • Fine grained reactivity: Leptos uses a fine-grained reactive system, enabling efficient updates and state management. This means that only the parts of the UI that changes are re-rendered, leading to a more efficient and performant application (No Virtual DOM!).
  • Rust-Based: Built in Rust, offering Blazing Fast TM performance benefits of a low-level language through WebAssembly.
  • SSR & CSR: Supports both Server-Side Rendering (SSR) and Client-Side Rendering (CSR), with seamless hydration. A user sees the rendered page immediately, and the client-side JavaScript takes over once it's fully loaded.
  • Full-Stack: Leptos is a full-stack framework, with a built-in server and client-side framework. This means your frontend and backend are written in the same language. Bye-bye CORS, mismatched types, and other headaches!
  • Component-Based: Structured around reusable, reactive components for building complex UIs.

Sounds cool! How do I get started?

We recommend going through the Leptos Book to get started with Leptos. The book covers everything from setting up a new project to building complex applications with Leptos. In case you are stuck somewhere, the book usually covers most of the common issues and solutions.

Prerequisites

  • Rust: Install Rust using rustup.
  • Cargo Leptos: Install cargo leptos using cargo install cargo-leptos. This greatly simplifies the process of running a project
  • Starter templates: Use the cargo leptos new command to create a new project from a template. You can pick from either an Actix or Axum backend. If you prefer to have your frontend and backend in different projects, check out the Axum Workspace Template for an example.

Ecosystem

No framework is complete without a rich ecosystem of libraries and tools. Here are some of the libraries and tools that are part of the Leptos ecosystem:

  • leptos-use: A collection of hooks for building reusable logic in Leptos.
  • leptos-query: Async state management for Leptos, providing simplified data fetching, integrated reactivity, SSR support, and smart cache management, inspired by TanStack Query.
  • thaw-ui: An easy to use leptos component library.
  • leptosfmt: A formatter for the leptos view! macro.

You can find more libraries and tools in the Leptos Awesome List.

Is it production ready?

People usually mean one of three things by this question.

  1. Are the APIs stable? i.e., will I have to rewrite my whole app from Leptos 0.1 to 0.2 to 0.3 to 0.4, or can I write it now and benefit from new features and updates as new versions come?

The APIs are basically settled. We’re adding new features, but we’re very happy with where the type system and patterns have landed. I would not expect major breaking changes to your code to adapt to future releases, in terms of architecture.

  1. Are there bugs?

Yes, I’m sure there are. You can see from the state of our issue tracker over time that there aren’t that many bugs and they’re usually resolved pretty quickly. But for sure, there may be moments where you encounter something that requires a fix at the framework level, which may not be immediately resolved.

  1. Am I a consumer or a contributor?

This may be the big one: "production ready" implies a certain orientation to a library: that you can basically use it, without any special knowledge of its internals or ability to contribute. Everyone has this at some level in their stack: for example I (@gbj) don’t have the capacity or knowledge to contribute to something like wasm-bindgen at this point: I simply rely on it to work.

There are several people in the community using Leptos right now for many websites at work, who have also become significant contributors. There may be missing features that you need, and you may end up building them! But, if you're willing to contribute a few missing pieces along the way, the framework is most definitely usable, especially given the ecosystem of libraries that have sprung up around it.

Come hang out with us!

  • Discord: Join our Discord server to chat with the community and the core team. We're a friendly bunch, and we're always happy to help out!
  • GitHub: Found a bug? Want to contribute? Head over to our GitHub repository and open an issue or a pull request.
  • Matrix: We also have a Matrix room if you prefer that over Discord.

Popular repositories Loading

  1. leptos leptos Public

    Build fast web applications with Rust.

    Rust 16.9k 673

  2. awesome-leptos awesome-leptos Public

    A collection of awesome libraries in the Leptos ecosystem.

    549 39

  3. cargo-leptos cargo-leptos Public

    Build tool for Leptos (Rust)

    Rust 372 109

  4. start-axum-0.6 start-axum-0.6 Public template

    Starter template for use with the Leptos web framework and Axum.

    Rust 146 25

  5. start-actix-0.6 start-actix-0.6 Public template

    Starter template for use with the Leptos web framework.

    Rust 125 31

  6. book book Public

    The home for the Leptos book, which can be found deployed at https://book.leptos.dev

    CSS 89 71

Repositories

Showing 10 of 22 repositories
  • book Public

    The home for the Leptos book, which can be found deployed at https://book.leptos.dev

    leptos-rs/book’s past year of commit activity
    CSS 89 MIT 71 13 6 Updated Dec 5, 2024
  • leptos Public

    Build fast web applications with Rust.

    leptos-rs/leptos’s past year of commit activity
    Rust 16,853 MIT 673 58 12 Updated Dec 5, 2024
  • leptos_wasi Public

    Leptos WASI Preview 2 integration, working with wasmcloud and possibly others

    leptos-rs/leptos_wasi’s past year of commit activity
    Rust 12 MIT 2 3 0 Updated Dec 3, 2024
  • cargo-leptos Public

    Build tool for Leptos (Rust)

    leptos-rs/cargo-leptos’s past year of commit activity
    Rust 372 MIT 109 53 15 Updated Dec 2, 2024
  • leptos-website Public

    A website for the Leptos Web Framework!

    leptos-rs/leptos-website’s past year of commit activity
    Rust 35 MIT 9 1 0 Updated Dec 1, 2024
  • start-actix Public

    Starter template for use with Leptos 0.7 and Actix.

    leptos-rs/start-actix’s past year of commit activity
    Rust 4 Unlicense 0 0 0 Updated Nov 30, 2024
  • start-axum Public

    Starter template for use with Leptos 0.7-alpha and Axum.

    leptos-rs/start-axum’s past year of commit activity
    Rust 12 Unlicense 6 0 1 Updated Nov 30, 2024
  • start-wasi Public

    A starter template for a WASI SSR server with Leptos

    leptos-rs/start-wasi’s past year of commit activity
    Rust 2 Unlicense 0 1 0 Updated Nov 17, 2024
  • awesome-leptos Public

    A collection of awesome libraries in the Leptos ecosystem.

    leptos-rs/awesome-leptos’s past year of commit activity
    549 MIT 39 1 0 Updated Nov 13, 2024
  • start-axum-workspace-0.7 Public

    Starter for Leptos in a workspace for 0.7

    leptos-rs/start-axum-workspace-0.7’s past year of commit activity
    Rust 0 Unlicense 0 0 0 Updated Nov 8, 2024

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Rust CSS

Most used topics

Loading…