Introducing Perseus for Rust Web Development!

arctic_hen7

arctic_hen7

Posted on September 5, 2021

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!

πŸ’– πŸ’ͺ πŸ™… 🚩
arctic_hen7
arctic_hen7

Posted on September 5, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related