Show HN: Proa – a Rust web framework with fast SSR and multi-target rendering
Introducing Proa: A High-Velocity Rust Framework for Multi-Target Rendering
Proa is a comprehensive, "batteries-included" web framework written in Rust. It is engineered for extreme performance and introduces a novel programming paradigm that allows developers to create composable components capable of rendering to multiple targets.
🎯 The Power of Multi-Target Rendering
Unlike traditional frameworks that tie a component to a single output, Proa allows a single typed component to generate HTML, Markdown, and other formats.
Implementation Example
Below is how a ProductCard might be implemented to support both Web and Markdown outputs:
// A single component serving multiple render targets
impl L: DataLoader WebRenderSync L for ProductCard {
fn render(self, cx: mut WebContext L) -> Result<(), WriteError> {
html_sync! {
<article data-product-card>
<h2>{self.product.name}</h2>
{ Link::new("Buy now", self.product.url) }
</article>
}
}
}
impl L: DataLoader MdRenderSync L for ProductCard {
fn render_md(self, cx: mut WebContext L) -> Result<(), WriteError> {
md_sync! {
### {self.product.name}
{ Link::new("Buy now", self.product.url) }
}
}
}
🚀 Performance & Benchmarks
Proa is designed for information-dense applications where speed is critical. It eliminates the "render tax" associated with modern JavaScript frameworks.
Speed Comparison
Measured on an 8-vCPU AMD EPYC-Milan VPS, the difference in server-side rendering (SSR) is staggering:
| Framework | p50 Render Time | Relative Speed |
|---|---|---|
| Proa | 5.56 ms | 1x (Baseline) |
React (renderToString) | ms | slower |
Rendering Pipeline
🛠️ The Component Ecosystem
Proa provides a library of 58 components, each featuring live examples, detailed props tables, and copy-pasteable Rust code.
Component Catalog
| Component | Tier | Description |
|---|---|---|
| Accordion | Free | CSS-only build; . |
| Table | Free | Composable header, body, and footer for dense data. |
| Button | Free | Multiple sizes/intents (Solid, Outline, Ghost, Link). |
| Field | Free | Integrated labels, descriptions, and error handling. |
| Card | Free | Versatile surface with header, content, and footer slots. |
| Calendar | Pro | Range selection and keyboard nav rendered as plain HTML. |
| Chart | Pro | Server-side pure SVG (Area, Bar, Line, Donut, Stacked). |
| OTP Input | Pro | Grouped one-time-code slots with custom caret styling. |
| Chat | Pro | Full assistant UI: bubbles, avatars, and typing indicators. |
| Code Block | Pro |
🏗️ Framework Architecture
Proa is not merely a templating engine; it is a full-surface framework.
"Everything people want from a modern web app, without the render tax underneath it."
Core Technical Pillars
- Unified
WebContext: Proa integrates streaming, request data, routing, and metadata into a single typedWebContextshared by all components. - Advanced Streaming SSR:
- In-order: Flush HTML sequentially when the document structure is strict.
- Out-of-order: Use Suspense boundaries to stream ready chunks, ensuring slow data fetches don't block the rest of the page.
- DataLoader Integration: Every render cycle has typed access to:
- Request-scoped data
- Response metadata
- Route state
- Loader caching
- Type-Safe Semantics: Layouts, mutations, and progressive navigation are handled via the Rust component model rather than "template glue."
Selective Interactivity (The "Island" Model)
Proa maintains a "Server-render by default" philosophy. You only ship JavaScript when interactivity is required.
- Native SSR: The bulk of the page is static HTML.
- RSJS Islands: Specific interactive zones (e.g., a
SearchIslandorMapViewport) are hydrated withrsjshandlers. - Compiler Verified: Because components are typed Rust, edits are checked by the compiler before they ever reach the user.
🖼️ Showcase
Proa's capabilities are demonstrated through high-fidelity re-creations of complex platforms:
- GitHub: Complex code views and issue tracking.
- Sentry: Dense telemetry dashboards and trace waterfalls.
- Airbnb: High-performance listing grids and booking calendars.
(Note: Proa is not affiliated with or endorsed by GitHub, Sentry, or Airbnb.)