Time to polish: Pavex is in closed beta ๐ŸŽ‰

We're starting a closed beta period for Pavex!
Head over to pavex.dev to sign up for early access. The first batch of invites will be sent out in a few weeks.

You can discuss this post on Reddit.

What is Pavex?

I want Rust to be a mainstream language for backend development: fast, safe, and productive.
Pavex is my attempt at turning this ambition into a reality.

Batteries included

Pavex aims to be a one-stop shop for your API projects, providing all the batteries you need to build something production-ready.
You can expect first-class solutions for common API development tasks (e.g. authentication, background jobs, telemetry, etc.) or an opinionated recommendation for specific high-quality third-party libraries (e.g. async executors, cryptography, etc.), with a smooth integration into the framework.

The first release of the framework will be focus on the foundations: manipulating HTTP requests and responses, routing, middleware, dependency injection, error handling. We'll then iterate on the framework to add more batteries as the core layer stabilizes.

Productive

Rust is a great language, but it has a large surface area: it's easy to feel like you never know enough to actually get started. Pavex aims to lower the barrier of entry: you'll only need an understanding of Rust core concepts to get up and running.
When things go wrong, we'll be there to help you: Pavex's transpiler will provide detailed error messages to help you understand what went wrong and how to fix it.

ERROR:
  ร— I can't invoke your wrapping middleware, `timeout`, because it needs an instance of
  โ”‚ `TimeoutConfig` as input, but I can't find a constructor for that type.
  โ”‚
  โ”‚     โ•ญโ”€[src/blueprint.rs:18:1]
  โ”‚  18 โ”‚
  โ”‚  19 โ”‚     bp.wrap(f!(crate::timeout));
  โ”‚     ยท             โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  โ”‚     ยท                     โ•ฐโ”€โ”€ The wrapping middleware was registered here
  โ”‚  20 โ”‚
  โ”‚     โ•ฐโ”€โ”€โ”€โ”€
  โ”‚    โ•ญโ”€[src/load_shedding.rs:5:1]
  โ”‚  5 โ”‚
  โ”‚  6 โ”‚ pub async fn timeout<T>(next: Next<T>, timeout_config: TimeoutConfig) -> Response
  โ”‚    ยท                                                        โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€
  โ”‚    ยท                I don't know how to construct an instance of this input parameter
  โ”‚    โ•ฐโ”€โ”€โ”€โ”€
  โ”‚   help: Register a constructor for `TimeoutConfig`

Safe

You can't be productive if you spend most of your time hunting down bugs.
Pavex's transpiler will catch as many errors as possible at compile-time, providing you with actionable feedback to fix them. This static analysis is on top of the usual Rust compiler checks: Pavex performs additional domain-specific checks at compile-time to ensure that your code behaves as expected at runtime.

This is all embedded into the framework. You don't have to install any additional tools or plugins, and it doesn't impact the complexity of the framework's API: we try to keep type complexity to a minimum, without sacrificing compile-time safety.

Flexible

Pavex is an opinionated framework, but it's designed to be flexible.
You can swap out any component of the framework with your own implementation, or defer to a third-party library.

It's a pragmatic choice: we expect most projects to align with the vast majority of Pavex's design decisions, but each environment brings its own requirements (especially in enterprise) and we want to make sure that you can adapt the framework to your needs.

How do I try it out?

Pavex's source code in on GitHub, but neither the transpiler nor the framework crates have been released yet.

We'll use the closed beta period to polish the documentation and iterate on the foundational APIs. If you want to help us out, head over to pavex.dev and sign up for early access.
The first batch of invites will be sent out in a few weeks: you'll be invited to join a private server where you'll be able to discuss Pavex with the team and other beta testers, get access to the documentation, and try out the framework.

See you there!

You can discuss this post on Reddit.