#wasm #frontend #webdev #ssg #ssr

perseus

A lightning-fast frontend web dev platform with full support for SSR and SSG

21 releases

0.3.0-beta.13 Oct 18, 2021
0.3.0-beta.12 Oct 17, 2021
0.3.0-beta.1 Sep 30, 2021
0.2.3 Sep 26, 2021
0.1.4 Sep 11, 2021

#42 in WebAssembly

Download history 60/week @ 2021-08-31 51/week @ 2021-09-07 15/week @ 2021-09-14 97/week @ 2021-09-21 213/week @ 2021-09-28 156/week @ 2021-10-05 179/week @ 2021-10-12 73/week @ 2021-10-19

256 downloads per month
Used in 2 crates

MIT license

205KB
3.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 major rendering strategies, reactivity without a virtual DOM, and extreme customizability. It wraps the lower-level capabilities of Sycamore!

  • 📕 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

Usage

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

use perseus::{define_app, ErrorPages, Template};
use sycamore::template;
define_app! {
    templates: [
        Template::<G>::new("index").template(|_| {
            template! {
                p { "Hello World!" }
            }
        })
    ],
    error_pages: ErrorPages::new(|url, status, err, _| {
        template! {
            p { (format!("An error with HTTP code {} occurred at '{}': '{}'.", status, url, err)) }
        }
    })
}

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.

Roadmap

Pre-stable

These tasks still need to be done before Perseus can be pushed to v1.0.0.

  • Create a custom CLI as a harness for apps without ridiculous amounts of configuration needed
  • Support i18n out of the box
  • Implement custom router
  • Allow direct modification of the document head
  • Improve SEO and initial load performance
  • Support custom template hierarchies
  • Pre-built integrations
    • Actix Web
    • AWS Lambda

Beyond

These tasks will be done after Perseus is stable.

  • Integrations for other platforms

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 at our Gitter link, or (for Sycamore-related stuff) on our channel on Sycamore's Discord server.

License

See LICENSE.

Dependencies

~20MB
~368K SLoC