Skip to main content

rustio_core/
lib.rs

1//! RustIO — a production-grade, strict-by-construction web framework
2//! for Rust.
3//!
4//! Write a model struct, derive `RustioAdmin`, and the framework
5//! provides the admin UI, HTTP/2 server, Postgres ORM, migrations,
6//! full-text search (Meilisearch), sessions, and granular RBAC.
7
8// Phase 7.3 — admin render-test fixtures hand-build large
9// `serde_json::json!` literals (FormField has ~16 fields × multiple
10// fields per fixture). The default recursion limit (128) is too low
11// for those macro expansions; 256 is the conventional bump.
12#![recursion_limit = "256"]
13
14pub mod admin;
15pub mod ai;
16pub mod ai_gen;
17pub mod auth;
18pub mod background;
19pub mod cache;
20pub mod error;
21pub mod http;
22pub mod middleware;
23pub mod migrations;
24pub mod orm;
25pub mod router;
26pub mod schema;
27pub mod search;
28pub mod server;
29pub mod templates;
30
31// Common vocabulary at the crate root.
32pub use crate::admin::{Admin, AdminField, AdminModel, FieldType};
33pub use crate::auth::{Identity, Role};
34pub use crate::error::{Error, Result};
35pub use crate::http::{FormData, Request, Response};
36pub use crate::orm::{Db, DbOptions, Model, Row, Value};
37pub use crate::router::{Next, Router};
38pub use crate::search::{Indexer, MeiliClient, Searchable};
39pub use crate::server::Server;
40
41pub use rustio_macros::RustioAdmin;
42
43// `RustioAdmin` emits `::rustio_core::*` paths in its expansion. That
44// resolves cleanly for downstream consumers, but inside this crate's
45// own compilation unit `rustio_core` isn't a known extern. Aliasing
46// the crate to itself under `cfg(test)` lets the macro be exercised by
47// `admin::macro_tests` without changing any non-test build.
48#[cfg(test)]
49extern crate self as rustio_core;