#![allow(
clippy::collapsible_if,
clippy::unnecessary_map_or,
clippy::redundant_async_block
)]
#![deny(clippy::unwrap_used, clippy::expect_used)]
#![warn(missing_docs)]
extern crate self as rullst;
pub mod config;
pub mod db;
pub mod edge;
#[cfg(not(target_arch = "wasm32"))]
pub mod ai;
#[cfg(not(target_arch = "wasm32"))]
pub mod artisan;
#[cfg(not(target_arch = "wasm32"))]
pub mod auth;
#[cfg(not(target_arch = "wasm32"))]
pub mod cache;
#[cfg(not(target_arch = "wasm32"))]
pub mod capital;
pub mod client;
#[cfg(not(target_arch = "wasm32"))]
pub mod error_console;
#[cfg(not(target_arch = "wasm32"))]
pub mod feature;
#[cfg(not(target_arch = "wasm32"))]
pub mod horizon;
pub mod html;
#[cfg(not(target_arch = "wasm32"))]
pub mod htmx;
#[cfg(not(target_arch = "wasm32"))]
pub mod live;
#[cfg(not(target_arch = "wasm32"))]
pub mod mail;
#[cfg(not(target_arch = "wasm32"))]
pub mod multitenant;
#[cfg(not(target_arch = "wasm32"))]
pub mod nexus;
#[cfg(not(target_arch = "wasm32"))]
pub mod queue;
#[cfg(not(target_arch = "wasm32"))]
pub mod resilience;
#[cfg(not(target_arch = "wasm32"))]
pub mod routing;
#[cfg(not(target_arch = "wasm32"))]
pub mod scheduler;
#[cfg(not(target_arch = "wasm32"))]
pub mod security;
#[cfg(not(target_arch = "wasm32"))]
pub mod server;
#[cfg(not(target_arch = "wasm32"))]
pub mod storage;
#[cfg(not(target_arch = "wasm32"))]
pub mod studio;
#[cfg(not(target_arch = "wasm32"))]
pub mod testing;
#[cfg(not(target_arch = "wasm32"))]
pub mod validation;
#[cfg(not(target_arch = "wasm32"))]
pub mod ws;
#[cfg(not(target_arch = "wasm32"))]
#[macro_export]
macro_rules! artisan {
($migrations:expr) => {
let _ = $crate::artisan::check_and_run_artisan($migrations, vec![]).await;
};
($migrations:expr, $seeders:expr) => {
let _ = $crate::artisan::check_and_run_artisan($migrations, $seeders).await;
};
}
pub use rullst_macros::{client_component, html};
#[cfg(not(target_arch = "wasm32"))]
pub use routing::Router;
#[cfg(not(target_arch = "wasm32"))]
pub use server::Server;
#[cfg(not(target_arch = "wasm32"))]
pub use rullst_orm::{Orm, RullstModel};
pub use config::{AppConfig, DatabaseConfig, RullstConfig, SecurityConfig};
#[cfg(not(target_arch = "wasm32"))]
pub mod response {
pub use axum::response::{Html, IntoResponse, Redirect, Response};
}
#[cfg(not(target_arch = "wasm32"))]
pub use htmx::{HtmxRequest, HtmxResponse, render_page};
#[cfg(not(target_arch = "wasm32"))]
pub use cache::Cache;
#[cfg(not(target_arch = "wasm32"))]
pub use queue::{Queue, QueuedJobDetail, Worker};
#[cfg(not(target_arch = "wasm32"))]
pub use scheduler::Scheduler;
#[cfg(not(target_arch = "wasm32"))]
pub use mail::{Mail, Message as MailMessage};
#[cfg(not(target_arch = "wasm32"))]
pub use storage::{Storage, StorageDriver, StorageError};
#[cfg(not(target_arch = "wasm32"))]
pub use validation::{Validate, ValidatedForm, ValidatedJson, ValidationError};
#[cfg(not(target_arch = "wasm32"))]
pub use ws::{WebSocket, WsError};
#[cfg(not(target_arch = "wasm32"))]
pub use resilience::{
RateLimitConfig, RateLimiter, TrafficShield, TrafficShieldConfig, backpressure_middleware,
rate_limit_middleware,
};
#[cfg(not(target_arch = "wasm32"))]
pub use ai::{
AiClient, AiError, AiProvider, ChatBuilder, Message as AiMessage, VectorDocument, VectorIndex,
};
#[cfg(not(target_arch = "wasm32"))]
pub use async_trait::async_trait;
#[cfg(not(target_arch = "wasm32"))]
pub use feature::{
DbFeatureDriver, EnvFeatureDriver, FeatureDriver, FeatureManager, MemoryFeatureDriver,
TomlFeatureDriver,
};
#[cfg(not(target_arch = "wasm32"))]
pub use multitenant::{TenantConfig, TenantLayer, TenantService, TenantStrategy, tenant_layer};
#[cfg(not(target_arch = "wasm32"))]
pub use testing::{TestApp, TestRequestBuilder, TestResponse};
#[cfg(not(target_arch = "wasm32"))]
pub use nexus::{FieldKind, FieldMeta, Nexus, NexusModel};
#[cfg(not(target_arch = "wasm32"))]
pub use capital::{
BillingProvider, LemonSqueezyProvider, StripeProvider, SubscriptionStatus, WebhookEvent,
};
#[cfg(not(target_arch = "wasm32"))]
pub mod runtime {
pub use async_trait::async_trait;
pub use tokio::{main, spawn, task, time};
}
pub mod web {
#[cfg(not(target_arch = "wasm32"))]
pub use axum;
#[cfg(not(target_arch = "wasm32"))]
pub use tower;
#[cfg(not(target_arch = "wasm32"))]
pub use tower_http;
}
pub mod async_runtime {
#[cfg(not(target_arch = "wasm32"))]
pub use tokio;
}
pub mod email_client {
#[cfg(feature = "mail-smtp")]
#[cfg(not(target_arch = "wasm32"))]
pub use lettre;
}