Expand description
RustIO — a production-grade, strict-by-construction web framework for Rust.
Write a model struct, derive RustioAdmin, and the framework
provides the admin UI, HTTP/2 server, Postgres ORM, migrations,
full-text search (Meilisearch), sessions, and granular RBAC.
Re-exports§
pub use crate::admin::Admin;pub use crate::admin::AdminField;pub use crate::admin::AdminModel;pub use crate::admin::FieldType;pub use crate::auth::Identity;pub use crate::auth::Role;pub use crate::error::Error;pub use crate::error::Result;pub use crate::http::FormData;pub use crate::http::Request;pub use crate::http::Response;pub use crate::orm::Db;pub use crate::orm::DbOptions;pub use crate::orm::Model;pub use crate::orm::Row;pub use crate::orm::Value;pub use crate::router::Next;pub use crate::router::Router;pub use crate::search::Indexer;pub use crate::search::MeiliClient;pub use crate::search::Searchable;pub use crate::server::Server;
Modules§
- admin
- The auto-generated admin UI.
- ai
- The AI boundary: a fixed vocabulary of primitives that the Phase 2 intelligence layer is allowed to emit.
- ai_gen
- Phase 8.0 — AI-assisted schema generation, developer-tool only.
- auth
- Authentication & authorization.
- background
- Background tasks. A tiny runner that spawns one tokio task per recurring job. Kept simple on purpose — we don’t ship a cron DSL, just “run this every N seconds”.
- cache
- In-process LRU cache for read queries.
- contract
- The Schema Contract System (Phase 14 — Commit 1, types only).
- contract_
doctor - Project-side subprocess hook for
rustio doctor --check-schema(Phase 14, commit 4). - contract_
validator - Schema Contract runtime validator (Phase 14, commit 3).
- error
- Unified error type. Every fallible path in the framework returns
Result<T, Error>, and the HTTP layer knows how to turn anErrorinto a proper response. - http
- The HTTP primitives.
RequestandResponseare thin wrappers around hyper’s types that carry a typed context and a few conveniences. - middleware
- Built-in middleware. Each piece is an async function with the
signature
async fn(Request, Next) -> Result<Response>. Drop any of them intoRouter::middleware(...)in whatever order you want. - migrations
- Versioned SQL migrations for PostgreSQL. Transactional where possible; the tracking table records which versions have been applied.
- orm
- PostgreSQL-backed ORM with aggressive pooling and a query-level read cache.
- router
- A small, opinionated router.
- schema
- Schema export: a deterministic, machine-readable description of every model the admin knows about.
- search
- Full-text search via Meilisearch.
- server
- The HTTP server. Binds a TCP listener, runs each connection on its own Tokio task, and shuts down gracefully on Ctrl-C.
- templates
- Template rendering. Rust code passes typed context; this module owns everything about HTML generation.