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.2k 635

  2. awesome-leptos awesome-leptos Public

    A collection of awesome libraries in the Leptos ecosystem.

    509 39

  3. cargo-leptos cargo-leptos Public

    Build tool for Leptos (Rust)

    Rust 362 106

  4. start-axum start-axum Public template

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

    Rust 141 26

  5. start-actix start-actix Public template

    Starter template for use with the Leptos web framework.

    Rust 121 31

  6. book book Public

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

    CSS 81 62

Repositories

Showing 10 of 19 repositories
  • leptos Public

    Build fast web applications with Rust.

    leptos-rs/leptos’s past year of commit activity
    Rust 16,168 MIT 635 55 10 Updated Oct 21, 2024
  • cargo-leptos Public

    Build tool for Leptos (Rust)

    leptos-rs/cargo-leptos’s past year of commit activity
    Rust 362 MIT 106 46 12 Updated Oct 21, 2024
  • .github Public

    The README for Leptos

    leptos-rs/.github’s past year of commit activity
    0 0 0 0 Updated Oct 19, 2024
  • awesome-leptos Public

    A collection of awesome libraries in the Leptos ecosystem.

    leptos-rs/awesome-leptos’s past year of commit activity
    509 MIT 39 1 1 Updated Oct 17, 2024
  • 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 81 MIT 62 16 4 Updated Oct 14, 2024
  • start-axum Public template

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

    leptos-rs/start-axum’s past year of commit activity
    Rust 141 Unlicense 26 3 3 Updated Oct 1, 2024
  • start-trunk Public template

    A Starter Template for Leptos-rs CSR Apps using the Trunk build tool

    leptos-rs/start-trunk’s past year of commit activity
    Rust 24 7 1 0 Updated Sep 8, 2024
  • leptos-website Public

    A website for the Leptos Web Framework!

    leptos-rs/leptos-website’s past year of commit activity
    Rust 34 MIT 9 0 0 Updated Aug 31, 2024
  • start-aws Public template

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

    leptos-rs/start-aws’s past year of commit activity
    Rust 13 MIT 3 2 1 Updated Aug 17, 2024
  • start-axum-0.7 Public

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

    leptos-rs/start-axum-0.7’s past year of commit activity
    Rust 9 Unlicense 4 0 1 Updated Aug 16, 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…