run-what-0.9.1 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 -
/pages/admin/users.htmlbecomes/admin/users - Template variables -
#user.name#,#session.count# - 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
- Live reload - Changes auto-refresh during development
- Component library - Reusable
<what-*>component tags
Installation
# Install from crates.io (recommended)
# Or build from source
Updating
To update to the latest version, simply run the install command again:
Cargo automatically replaces the old version with the new one.
Quick Start
# Create a new project
# Start the development server
# Open http://127.0.0.1:8085
Custom Port
To run the server on a different port:
Hot Reload
The development server automatically watches for file changes. When you edit any .html, .css, .js, .json, .toml, or .what file, the browser refreshes automatically. No manual reload needed.
This works by:
- Watching the project directory for changes
- Detecting relevant file modifications (ignores
.dband hidden files) - Broadcasting a reload signal to connected browsers via WebSocket
Basic Usage
Create pages in the pages/ directory:
<!-- pages/index.html -->
Hello, #name#!
Routes are file-based:
pages/index.html→/pages/about.html→/aboutpages/blog/index.html→/blog
Documentation
See the docs/ folder for detailed guides on:
- Template Syntax - Variables, includes, loops, conditionals
- Custom Tags - Creating reusable components
- Form Actions - CRUD operations without JavaScript
- Client Attributes -
w-get,w-post, modals, SPA navigation - Reactive Variables - Auto-updating session variables
- Configuration - Server, cache, and session settings
- Dynamic Routes - URL parameters and patterns
License
MIT