1#![allow(
3 clippy::collapsible_if,
4 clippy::unnecessary_map_or,
5 clippy::redundant_async_block
6)]
7#![deny(clippy::unwrap_used, clippy::expect_used)]
8#![warn(missing_docs)]
9extern crate self as rullst;
10
11pub mod config;
13pub mod db;
14pub mod edge;
15
16#[cfg(all(not(target_arch = "wasm32"), feature = "orm"))]
17pub mod artisan;
19#[cfg(not(target_arch = "wasm32"))]
20pub mod cache;
21pub mod client;
23pub mod client_contract;
25#[cfg(not(target_arch = "wasm32"))]
26pub mod devops;
28#[cfg(not(target_arch = "wasm32"))]
29pub mod di;
31#[cfg(not(target_arch = "wasm32"))]
32mod error_buffer;
33#[cfg(not(target_arch = "wasm32"))]
34pub mod error_console;
36#[cfg(not(target_arch = "wasm32"))]
37pub mod feature;
39#[cfg(not(target_arch = "wasm32"))]
40pub mod frontend;
42#[cfg(not(target_arch = "wasm32"))]
43pub mod health;
45#[cfg(not(target_arch = "wasm32"))]
46pub mod html;
48#[cfg(not(target_arch = "wasm32"))]
49pub mod htmx;
51#[cfg(not(target_arch = "wasm32"))]
52pub mod lifecycle;
54#[cfg(not(target_arch = "wasm32"))]
55pub mod live;
57#[cfg(not(target_arch = "wasm32"))]
58pub mod multitenant;
60#[cfg(all(not(target_arch = "wasm32"), feature = "offline-sync"))]
61pub mod offline_sync;
63#[cfg(not(target_arch = "wasm32"))]
64pub mod production;
66#[cfg(not(target_arch = "wasm32"))]
67pub mod queue;
68#[cfg(not(target_arch = "wasm32"))]
69pub mod radar;
71#[cfg(not(target_arch = "wasm32"))]
72pub mod realtime;
74#[cfg(all(
75 not(target_arch = "wasm32"),
76 any(feature = "cache-redis", feature = "queue-redis")
77))]
78mod redis_connection;
79#[cfg(not(target_arch = "wasm32"))]
80pub mod resilience;
82#[cfg(not(target_arch = "wasm32"))]
83pub mod routing;
85pub mod rpc;
87#[cfg(not(target_arch = "wasm32"))]
88pub mod scalar;
90#[cfg(not(target_arch = "wasm32"))]
91pub mod scheduler;
92#[cfg(not(target_arch = "wasm32"))]
93pub mod security;
95#[cfg(not(target_arch = "wasm32"))]
96pub mod server;
98#[cfg(not(target_arch = "wasm32"))]
99pub mod storage;
101#[cfg(not(target_arch = "wasm32"))]
102pub mod telemetry;
104#[cfg(not(target_arch = "wasm32"))]
105pub mod telemetry_spans;
107#[cfg(not(target_arch = "wasm32"))]
108pub mod testing;
110#[cfg(not(target_arch = "wasm32"))]
111pub mod uploads;
112#[cfg(not(target_arch = "wasm32"))]
113pub mod validation;
115#[cfg(not(target_arch = "wasm32"))]
116pub mod ws;
118
119#[cfg(all(not(target_arch = "wasm32"), feature = "orm"))]
120#[macro_export]
121macro_rules! artisan {
123 ($migrations:expr) => {
124 let _ = $crate::artisan::check_and_run_artisan($migrations, vec![]).await;
125 };
126 ($migrations:expr, $seeders:expr) => {
127 let _ = $crate::artisan::check_and_run_artisan($migrations, $seeders).await;
128 };
129}
130
131pub use rullst_macros::{
133 html, island, live_component, live_event, memoize, route, server_function,
134};
135
136#[cfg(not(target_arch = "wasm32"))]
138pub use routing::Router;
139
140#[cfg(not(target_arch = "wasm32"))]
141pub use server::{Server, ServerError};
142
143#[cfg(all(not(target_arch = "wasm32"), feature = "orm"))]
145pub use rullst_orm::{Orm, RullstModel};
146
147pub use config::{AppConfig, DatabaseConfig, RullstConfig, SecurityConfig};
149
150#[cfg(not(target_arch = "wasm32"))]
152pub use axum::http;
153
154#[cfg(not(target_arch = "wasm32"))]
156pub mod response {
158 pub use axum::response::{Html, IntoResponse, Redirect, Response};
159}
160
161#[cfg(not(target_arch = "wasm32"))]
163pub use htmx::{HtmxRequest, HtmxResponse, render_page};
164#[cfg(not(target_arch = "wasm32"))]
165pub use lifecycle::{
166 ApplicationLifecycle, ApplicationLifecycleError, ApplicationPhase, ReadinessSnapshot,
167 apply_lifecycle,
168};
169
170#[cfg(not(target_arch = "wasm32"))]
172pub use cache::{Cache, TenantCache};
173#[cfg(not(target_arch = "wasm32"))]
174pub use di::{Container, DiError, Inject, Injectable};
175#[cfg(not(target_arch = "wasm32"))]
176pub use queue::{Queue, QueuedJobDetail, Worker, WorkerHandle};
177#[cfg(not(target_arch = "wasm32"))]
178pub use realtime::{
179 BroadcastManager, Channel, RealtimeError, RealtimeMessage, TenantPresence, TenantRealtime,
180};
181#[cfg(not(target_arch = "wasm32"))]
182pub use scheduler::{Scheduler, SchedulerError, SchedulerFailurePolicy, SchedulerHandle};
183
184#[cfg(not(target_arch = "wasm32"))]
186pub use storage::{LocalDriver, Storage, StorageDriver, StorageError, TenantStorage};
187#[cfg(not(target_arch = "wasm32"))]
188pub use uploads::{
189 OfflineMockScanner, QuarantinedUpload, ReleasedUpload, ScanVerdict, UploadError, UploadKind,
190 UploadPolicy, UploadScanner,
191};
192#[cfg(not(target_arch = "wasm32"))]
193pub use validation::{Validate, ValidatedForm, ValidatedJson, ValidationError};
194#[cfg(not(target_arch = "wasm32"))]
195pub use ws::{WebSocket, WsError};
196
197#[cfg(not(target_arch = "wasm32"))]
199pub use production::{
200 AcademyBoundaryAssessment, AcademyCheckStatus, AcademyPresetError, AcademyProductionPreset,
201 AcademyProductionRequirement, ProductionMiddlewareStage, ProductionPreset,
202};
203#[cfg(not(target_arch = "wasm32"))]
204pub use resilience::{
205 RateLimitConfig, RateLimiter, TrafficShield, TrafficShieldConfig, TrafficShieldError,
206 backpressure_middleware, rate_limit_middleware,
207};
208#[cfg(not(target_arch = "wasm32"))]
209pub use security::{SecurityBaselineError, apply_security_baseline};
210
211#[cfg(not(target_arch = "wasm32"))]
212pub use async_trait::async_trait;
213#[cfg(all(not(target_arch = "wasm32"), feature = "orm"))]
214pub use feature::DbFeatureDriver;
215#[cfg(not(target_arch = "wasm32"))]
216pub use feature::{
217 EnvFeatureDriver, FeatureDriver, FeatureManager, MemoryFeatureDriver, TomlFeatureDriver,
218};
219#[cfg(not(target_arch = "wasm32"))]
220pub use multitenant::{TenantConfig, TenantLayer, TenantService, TenantStrategy, tenant_layer};
221
222#[cfg(not(target_arch = "wasm32"))]
223pub use testing::{TestApp, TestRequestBuilder, TestResponse};
224
225#[cfg(not(target_arch = "wasm32"))]
228pub mod runtime {
230 pub use async_trait::async_trait;
231 pub use tokio::{main, spawn, task, time};
232}
233
234pub mod web {
236 #[cfg(not(target_arch = "wasm32"))]
237 pub use axum;
238 #[cfg(not(target_arch = "wasm32"))]
239 pub use tower;
240 #[cfg(not(target_arch = "wasm32"))]
241 pub use tower_http;
242}
243
244pub mod async_runtime {
246 #[cfg(not(target_arch = "wasm32"))]
247 pub use tokio;
248}