38 releases

Uses new Rust 2021

new 0.4.0-beta.3 Jul 4, 2022
0.4.0-beta.1 May 30, 2022
0.3.3 Feb 15, 2022
0.3.0 Dec 21, 2021
0.3.0-beta.18 Nov 28, 2021

#398 in WebAssembly

Download history 177/week @ 2022-03-16 115/week @ 2022-03-23 44/week @ 2022-03-30 80/week @ 2022-04-06 129/week @ 2022-04-13 117/week @ 2022-04-20 293/week @ 2022-04-27 295/week @ 2022-05-04 584/week @ 2022-05-11 190/week @ 2022-05-18 244/week @ 2022-05-25 436/week @ 2022-06-01 145/week @ 2022-06-08 204/week @ 2022-06-15 235/week @ 2022-06-22 368/week @ 2022-06-29

963 downloads per month
Used in 6 crates (via perseus)

MIT license

89KB
1.5K SLoC

Perseus

Book API Docs Crate Page Top Language Discord Chat

Perseus is a blazingly fast frontend web development framework built in Rust with support for generating page state at build-time, request-time, incrementally, or whatever you'd like! It supports reactivity using Sycamore, and builds on it to provide a fully-fledged framework for developing modern apps.

  • 📕 Supports static generation (serving only static resources)
  • 🗼 Supports server-side rendering (serving dynamic resources)
  • 🔧 Supports revalidation after time and/or with custom logic (updating rendered pages)
  • 🛠️ Supports incremental regeneration (build on demand)
  • 🏭 Open build matrix (use any rendering strategy with anything else)
  • 🖥️ CLI harness that lets you build apps with ease and confidence
  • 🌐 Full i18n support out-of-the-box with Fluent
  • 🏎 Lighthouse scores of 100 on desktop and over 95 on mobile
  • ⚡ Support for hot state reloading (reload your entire app's state after you make any code changes in development, Perseus is the only framework in the world that can do this, to our knowledge)

Usage

Here's a taste of Perseus (see the tiny example for more):

use perseus::{Html, PerseusApp, Template};
use sycamore::view;

#[perseus::main(perseus_warp::dflt_server)]
pub fn main<G: Html>() -> PerseusApp<G> {
    PerseusApp::new().template(|| {
        Template::new("index").template(|cx, _| {
            view! { cx,
                p { "Hello World!" }
            }
        })
    })
}

Check out the book to learn how to turn that into your next app!

Aim

Support every major rendering strategy and provide developers the ability to efficiently create super-fast apps with Rust and a fantastic developer experience!

Motivation

There is a sore lack of Rust frameworks for frontend development that support more than just SPAs and client-side rendering, and so Perseus was born. We need something like NextJS for Wasm (but why stop there?).

Contributing

We appreciate all kinds of contributions, check out our contributing guidelines for more information! Also, please be sure to follow our code of conduct.

You can also chat about Perseus on our channel on Sycamore's Discord server.

License

See LICENSE.

Dependencies

~10MB
~197K SLoC