runique

Crates.iorunique
lib.rsrunique
version1.1.11
created_at2026-01-03 18:29:45.320947+00
updated_at2026-01-25 00:53:05.370574+00
descriptionA Django-inspired web framework for Rust with ORM, templates, and comprehensive security middleware
homepagehttps://github.com/seb-alliot/runique
repositoryhttps://github.com/seb-alliot/runique
max_upload_size
id2020574
size1,003,276
itsuki (seb-alliot)

documentation

https://docs.rs/runique

README

πŸš€ Runique - Django-inspired Rust Web Framework

⚠️ Note: This documentation has been generated with AI assistance. While care has been taken to ensure accuracy, some links or details may contain errors. Please report issues on GitHub.

Rust Tests License Version Crates.io

A modern and comprehensive Rust web framework inspired by Django, for building robust and performant web applications.

🌍 Languages : English | πŸ‡«πŸ‡· FranΓ§ais

πŸ“š Table of Contents


πŸš€ Installation

Full Documentation : Installation Guide

Quick start:

git clone https://github.com/seb-alliot/runique
cd runique
cargo build
cargo test --all

πŸ‘‰ Read : docs/en/01-installation.md for complete details


πŸ—οΈ Architecture

Full Documentation : Architecture Guide

Overview of Runique's architecture:

Runique Framework
β”œβ”€β”€ Forms System      # Type-safe forms
β”œβ”€β”€ Routing Engine    # URL pattern routing
β”œβ”€β”€ Template Engine   # Tera templates
β”œβ”€β”€ Middleware Stack  # Security & headers
β”œβ”€β”€ ORM Layer         # SeaORM integration
└── Utils             # Helpers and utilities

πŸ‘‰ Read : docs/en/02-architecture.md for internal structure


βš™οΈ Configuration

Full Documentation : Configuration Guide

Configure your server and application:

let settings = Settings {
    server: ServerConfig { ... },
    database: DatabaseConfig { ... },
    security: SecurityConfig { ... },
};

πŸ‘‰ Read : docs/en/03-configuration.md for all options


πŸ›£οΈ Routing

Full Documentation : Routing Guide

Define your routes with Axum's Router:

use axum::routing::{get, post};

fn routes() -> Router {
    Router::new()
        .route("/", get(views::home))
        .route("/api/users", post(views::create_user))
}

πŸ‘‰ Read : docs/en/04-routing.md for patterns and options


πŸ“ Forms

Full Documentation : Forms Guide

Create forms easily with #[derive(RuniqueForm)]:

#[derive(RuniqueForm)]
pub struct UserForm {
    #[field(label = "Username", required, min_length = 3)]
    pub username: String,

    #[field(label = "Email", required, input_type = "email")]
    pub email: String,
}

// Handle form submission
async fn register(
    Prisme(mut form): Prisme<UserForm>,
    mut template: TemplateContext,
) -> Response {
    if form.is_valid().await {
        // Process form
    }
    template.context.insert("form", form);
    template.render("register.html")
}

πŸ‘‰ Read : docs/en/05-forms.md for all field types## 🎨 Templates

Full Documentation : Templates Guide

Use Tera templates:

<h1>{{ title }}</h1>
{% for item in items %}
  <p>{{ item }}</p>
{% endfor %}

πŸ‘‰ Read : docs/en/06-templates.md for complete syntax


πŸ—„οΈ ORM

Full Documentation : ORM Guide

Use SeaORM with Django-like pattern:

impl_objects!(User);

let users = User::objects
    .filter(active.eq(true))
    .all(&db)
    .await?;

πŸ‘‰ Read : docs/en/07-orm.md for advanced queries


πŸ”’ Middleware

Full Documentation : Middleware Guide

Integrated security middleware:

  • CSRF Protection
  • Content-Security-Policy (CSP)
  • Allowed Hosts
  • Security Headers
  • XSS Sanitizer

πŸ‘‰ Read : docs/en/08-middleware.md for configuration


πŸ’¬ Flash Messages

Full Documentation : Flash Messages Guide

Temporary messages for users:

success!("Operation successful!");
error!("An error occurred");
warning!("Warning!");

πŸ‘‰ Read : docs/en/09-flash-messages.md for details


πŸŽ“ Examples

Full Documentation : Examples Guide

Complete usage examples:

  • Complete blog application
  • User authentication
  • File upload
  • REST API

πŸ‘‰ Read : docs/en/10-examples.md for complete examples


πŸ§ͺ Tests

# Unit tests
cargo test --lib

# Integration tests
cargo test --test integration_tests

# All tests
cargo test --all

Results: 36/36 tests passing βœ…


πŸ“– Full Documentation

English (EN)

FranΓ§ais (FR)


🎯 Quick Start

  1. Read Installation
  2. Understand Architecture
  3. Check Examples
  4. Start coding your application

πŸ“Š Project Status

  • βœ… Compilation : No errors
  • βœ… Tests : 36/36 passing (100%)
  • βœ… Documentation : Complete (EN & FR)
  • βœ… Production : Ready

See PROJECT_STATUS.md for more details.


πŸ”— Resources


πŸ“ License

MIT License - see SECURITY.md


πŸš€ Production Ready

The Runique framework is stable, tested and documented, ready for production use.

Start now β†’ Installation


🌍 Available in: English | πŸ‡«πŸ‡· FranΓ§ais

Commit count: 174

cargo fmt