Markdown
Renders CommonMark as styled HTML with tree-sitter syntax highlighting for code blocks.
Full Example
A realistic markdown document with headings, lists, code, and more.
Getting Started with Proa
Proa is a Rust SSR framework that compiles templates into optimized byte sequences at compile time.
Installation
Add Proa to your Cargo.toml:
[dependencies]
proa_core = "0.1"
proa_macros = "0.1"
proa_ui = "0.1"
Your First Component
Synchronous components implement the WebRenderSync trait:
use proa_core::{DataLoader, WebContext, WebRenderSync, WriteBuf, WriteError};
use proa_macros::html_sync;
struct Card<'a> {
title: &'a str,
body: &'a str,
}
impl<'a, B: WriteBuf, L: DataLoader> WebRenderSync<L, B> for Card<'a> {
fn render(self, cx: &mut WebContext<L, B>) -> Result<(), WriteError> {
html_sync! {
<div class="card">
<h3>{self.title}</h3>
<p>{self.body}</p>
</div>
}
.render(cx)
}
}
Key Features
- Zero-allocation rendering — no heap in the hot path
- Compile-time validation — catch errors before runtime
- Dual output — same component renders HTML and Markdown
- 30+ components — buttons, cards, dialogs, tables, and more
Benchmarks
| Framework | Render Time | Allocations |
|---|---|---|
| Proa | 1.2 µs | 0 |
| Askama | 8.4 µs | 3 |
| Tera | 24.1 µs | 12 |
| Handlebars | 31.7 µs | 18 |
Proa achieves this by consolidating static HTML into byte literals at compile time. Only dynamic values are written at runtime.
See the component catalog for live examples.
Inline Formatting
Bold, italic, strikethrough, inline code, and links.
This has bold, italic, strikethrough, inline code, and a link.
Blockquote
The best way to predict the future is to implement it.
— David Heinemeier Hansson
Lists
- Add dependencies
- Create a component
- Render it
Or unordered:
- Fast
- Safe
- Ergonomic
How It Works
- Parses CommonMark via pulldown-cmark (same parser used by docs.rs)
- Each element gets Tailwind prose classes for consistent typography
- Fenced code blocks delegate to CodeBlock for tree-sitter highlighting
- Tables, blockquotes, task lists, and horizontal rules all supported
- Behind the markdown feature flag — pulldown-cmark is pure Rust, no C deps
CommonMark rendering with styled prose.
Proa UI Pro component source is proprietary and requires an accepted Proa UI Pro Commercial License Agreement. Subject to that agreement, the self-serve license includes the limited commercial Proa framework rights needed to use Proa UI Pro in closed-source products.
proa ui add markdownRequires an active Proa UI Pro license and access to the private component registry.
CLI and registry setup