DEV Community

arctic_hen7
arctic_hen7

Posted on

Introducing Perseus for Rust Web Development!

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!

GitHub logo framesurge / perseus

A state-driven web development framework for Rust with full support for server-side rendering and static generation.

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โ€ฆ

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)

Collapse
 
pandademic profile image
Pandademic

great job!

Collapse
 
arctic_hen7 profile image
arctic_hen7

Thanks!