run-what-0.9.6 is not a library.
wwwhat
A Rust-based HTML framework for building server-rendered web applications with automatic interactivity.
No JavaScript frameworks. No build steps. Just HTML.
Features
- File-based routing -
site/about.htmlbecomes/about - Template variables -
#user.name#,#session.count#,#var|filter:arg# - Components - Reusable
<what-*>tags with props, defaults, and slots - HTML injection -
w-get,w-postfor AJAX without JavaScript - Reactive session variables - Session values auto-update across the page
- JWT authentication - Protected routes and role-based access via
auth:directives - SQLite database - Schema declarations, auto-migration, collection queries
- Form validation - Client + server enforcement with
w-validate - Email sending - SMTP or Resend API, templates with
#variable#syntax - Live reload - Changes auto-refresh during development
- Static build -
run-what buildpre-renders to static HTML with minification - Deploy - SSH, Docker, or static hosting via
run-what deploy
Installation
# Install from crates.io (recommended)
# Or build from source
Updating
Quick Start
# Create a new project
# Start the development server
# Open http://127.0.0.1:8085
Basic Usage
Create pages in the site/ directory:
<!-- site/index.html -->
title: Home
data.session = ["counter"]
#title#
Count: #session.counter|default:"0"#
+1
Routes are file-based:
site/index.html->/site/about.html->/aboutsite/blog/index.html->/blogsite/blog/[slug].html->/blog/:slug
Components are HTML files in components/:
<!-- components/card.html -> <what-card> -->
props = "title"
#title#
Documentation
See the docs/ folder for detailed guides:
- Getting Started - Installation, create a project, first page
- Template Syntax - Variables, loops, conditionals, filters
- Components - Creating reusable components with props and slots
- Form Actions - CRUD operations without JavaScript
- Client Attributes -
w-get,w-post, modals, SPA navigation - Reactive Variables - Auto-updating session variables
- Configuration - Server, cache, session, database, auth, uploads, email
- Dynamic Routes - URL parameters and patterns
- CSS Framework - Utility classes, components, dark mode
- Reference - Complete cheat sheet of all features
- Build a Blog - End-to-end tutorial
- Deploy to Cloudflare - D1, R2, Turnstile setup (free tier)
- Comparisons - vs HTMX, Astro, Hugo
CLI Commands
License
MIT