#![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(all(not(target_arch = "wasm32"), feature = "orm"))]
pub mod artisan;
#[cfg(not(target_arch = "wasm32"))]
pub mod cache;
pub mod client;
pub mod client_contract;
#[cfg(not(target_arch = "wasm32"))]
pub mod devops;
#[cfg(not(target_arch = "wasm32"))]
pub mod di;
#[cfg(not(target_arch = "wasm32"))]
mod error_buffer;
#[cfg(not(target_arch = "wasm32"))]
pub mod error_console;
#[cfg(not(target_arch = "wasm32"))]
pub mod feature;
#[cfg(not(target_arch = "wasm32"))]
pub mod frontend;
#[cfg(not(target_arch = "wasm32"))]
pub mod health;
#[cfg(not(target_arch = "wasm32"))]
pub mod html;
#[cfg(not(target_arch = "wasm32"))]
pub mod htmx;
#[cfg(not(target_arch = "wasm32"))]
pub mod lifecycle;
#[cfg(not(target_arch = "wasm32"))]
pub mod live;
#[cfg(not(target_arch = "wasm32"))]
pub mod multitenant;
#[cfg(all(not(target_arch = "wasm32"), feature = "offline-sync"))]
pub mod offline_sync;
#[cfg(not(target_arch = "wasm32"))]
pub mod production;
#[cfg(not(target_arch = "wasm32"))]
pub mod queue;
#[cfg(not(target_arch = "wasm32"))]
pub mod radar;
#[cfg(not(target_arch = "wasm32"))]
pub mod realtime;
#[cfg(all(
not(target_arch = "wasm32"),
any(feature = "cache-redis", feature = "queue-redis")
))]
mod redis_connection;
#[cfg(not(target_arch = "wasm32"))]
pub mod resilience;
#[cfg(not(target_arch = "wasm32"))]
pub mod routing;
pub mod rpc;
#[cfg(not(target_arch = "wasm32"))]
pub mod scalar;
#[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 telemetry;
#[cfg(not(target_arch = "wasm32"))]
pub mod telemetry_spans;
#[cfg(not(target_arch = "wasm32"))]
pub mod testing;
#[cfg(not(target_arch = "wasm32"))]
pub mod uploads;
#[cfg(not(target_arch = "wasm32"))]
pub mod validation;
#[cfg(not(target_arch = "wasm32"))]
pub mod ws;
#[cfg(all(not(target_arch = "wasm32"), feature = "orm"))]
#[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::{
html, island, live_component, live_event, memoize, route, server_function,
};
#[cfg(not(target_arch = "wasm32"))]
pub use routing::Router;
#[cfg(not(target_arch = "wasm32"))]
pub use server::{Server, ServerError};
#[cfg(all(not(target_arch = "wasm32"), feature = "orm"))]
pub use rullst_orm::{Orm, RullstModel};
pub use config::{AppConfig, DatabaseConfig, RullstConfig, SecurityConfig};
#[cfg(not(target_arch = "wasm32"))]
pub use axum::http;
#[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 lifecycle::{
ApplicationLifecycle, ApplicationLifecycleError, ApplicationPhase, ReadinessSnapshot,
apply_lifecycle,
};
#[cfg(not(target_arch = "wasm32"))]
pub use cache::{Cache, TenantCache};
#[cfg(not(target_arch = "wasm32"))]
pub use di::{Container, DiError, Inject, Injectable};
#[cfg(not(target_arch = "wasm32"))]
pub use queue::{Queue, QueuedJobDetail, Worker, WorkerHandle};
#[cfg(not(target_arch = "wasm32"))]
pub use realtime::{
BroadcastManager, Channel, RealtimeError, RealtimeMessage, TenantPresence, TenantRealtime,
};
#[cfg(not(target_arch = "wasm32"))]
pub use scheduler::{Scheduler, SchedulerError, SchedulerFailurePolicy, SchedulerHandle};
#[cfg(not(target_arch = "wasm32"))]
pub use storage::{LocalDriver, Storage, StorageDriver, StorageError, TenantStorage};
#[cfg(not(target_arch = "wasm32"))]
pub use uploads::{
OfflineMockScanner, QuarantinedUpload, ReleasedUpload, ScanVerdict, UploadError, UploadKind,
UploadPolicy, UploadScanner,
};
#[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 production::{
AcademyBoundaryAssessment, AcademyCheckStatus, AcademyPresetError, AcademyProductionPreset,
AcademyProductionRequirement, ProductionMiddlewareStage, ProductionPreset,
};
#[cfg(not(target_arch = "wasm32"))]
pub use resilience::{
RateLimitConfig, RateLimiter, TrafficShield, TrafficShieldConfig, TrafficShieldError,
backpressure_middleware, rate_limit_middleware,
};
#[cfg(not(target_arch = "wasm32"))]
pub use security::{SecurityBaselineError, apply_security_baseline};
#[cfg(not(target_arch = "wasm32"))]
pub use async_trait::async_trait;
#[cfg(all(not(target_arch = "wasm32"), feature = "orm"))]
pub use feature::DbFeatureDriver;
#[cfg(not(target_arch = "wasm32"))]
pub use feature::{
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 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;
}