Perseus is a high-level web development framework for Rust, with full support for SSG and SSR. It's based on Sycamore (a VDOM-less reactivity system for Rust) and adds higher-level functionality, including an Actix Web integration and even a CLI to make development easier!
framesurge / perseus
A state-driven web development framework for Rust with full support for server-side rendering and static generation.
Perseus
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β¦
Why?
Since switching from JavaScript to Rust, I've found that there's a distinct lack of a framework in Rust that supports SSR and SSG. Very few even support one. That's where Perseus comes in, with support for SSG, SSR, revalidation, and even incremental generation. In a nutshell, Perseus aims to support all the rendering strategies of NextJS, but in WASM.
Documentation
You can find Perseus' API documentation here and the book, which explains every feature in detail, here.
I've also written a multi-part tutorial on setting up a basic app with Perseus here, which explains everything from installation to serving!
Project Status
Right now, Perseus is still in its early stages, but I hope that it will help people to build lightning-fast apps in Rust using rendering strategies that, up until now, have only been available to JavaScript developers.
Final Words
When I first started out with React many years ago, I had the thought of building my own framework, which I quickly dismissed as foolish, I had everything I needed. But in Rust, we don't yet have everything we need to build awesome web apps, and so Perseus was born to try to solve that problem. Any feedback would be greatly appreciated!
Top comments (2)
great job!
Thanks!