Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

RustF Framework Documentation

🤖 AI-Agent Optimized | 🚧 Release Candidate | 🛡️ Security-Focused | ⚡ High Performance

Welcome to RustF

RustF is a convention-based MVC web framework for Rust, inspired by Total.js v4. Designed to be equally intuitive for human developers and AI coding assistants, with auto-discovery, predictable patterns, comprehensive documentation, enterprise-grade security, and optimized performance.

What is RustF?

RustF provides a complete web development stack for Rust applications:

  • Convention Over Configuration - Sensible defaults reduce boilerplate
  • AI-Friendly Development - Predictable patterns and comprehensive documentation
  • Total.js Inspiration - Familiar patterns for web developers
  • Type Safety - Compile-time validation throughout the stack
  • Auto-Discovery - Automatic component registration at build time
  • Schema-Driven - YAML schemas drive model generation and database tools

Key Features

✅ Auto-Discovery System - Automatic registration of controllers, models, middleware
✅ Convention-Based Architecture - Predictable project structure and patterns
✅ Comprehensive CLI Tools - Project scaffolding, schema management, database tools
✅ Template Engine - Total.js-style template system with layouts and partials
✅ Advanced Session Management - Memory, Redis, and database storage backends
✅ Built-in Security Features - CORS, CSRF protection, secure headers
✅ Database Tools - Multi-database query builder with schema management
✅ Performance Optimized - Request pooling, caching, and memory safety

Quick Start

Get started with RustF in just 3 commands:

# Using the CLI tool (recommended)
rustf-cli new project my-app
cd my-app
cargo run

Visit Getting Started for detailed installation and setup instructions.

Most Common Paths

If you only need the common workflows, start here:

Documentation Structure

This documentation is organized to help you learn RustF at your own pace:

  • Getting Started - Perfect for beginners. Learn how to install RustF, create your first application, and understand the project structure.
  • CLI - The fastest path for most users. Create projects, generate components, inspect applications, and run schema workflows.
  • Core Guides - Essential framework concepts: controllers, views, middleware, sessions, databases, and more.
  • Advanced Topics - For experienced developers: performance optimization, workers, events, and advanced patterns.
  • API Reference - Complete API documentation for all framework components.
  • Examples & Tutorials - Step-by-step tutorials for building real-world applications.
  • Deployment - Production deployment guides, Docker setup, and performance tuning.

Who is This Documentation For?

Beginners

Experienced Developers

AI Coding Assistants

  • Structured documentation with clear patterns
  • Comprehensive API references
  • Predictable conventions
  • Code examples throughout

Framework Philosophy

RustF follows these core principles:

  1. Convention Over Configuration - Sensible defaults mean less code
  2. Type Safety First - Compile-time validation prevents runtime errors
  3. AI-Friendly - Predictable patterns make it easy for AI assistants to help
  4. Performance by Default - Optimized for speed and efficiency
  5. Security Built-In - Enterprise-grade security features included

Community & Support

Contributing

We welcome contributions! The framework was developed with AI collaboration and we actively seek feedback from the Rust community to improve code quality, safety, and performance.

License

RustF is dual-licensed under MIT and Apache 2.0 licenses.


Ready to get started? Head to Getting Started to begin your RustF journey!