1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//! # Rusty SSR
//!
//! High-performance Server-Side Rendering engine for Rust with V8 isolate pool
//! and multi-tier CPU-optimized caching.
//!
//! ## Features
//!
//! - **V8 Isolate Pool**: Thread pool with dedicated V8 isolates for parallel SSR
//! - **Multi-tier Cache**: L1/L2 CPU cache (hot) + RAM (cold) with LRU eviction
//! - **Axum Integration**: Ready-to-use middleware for Axum web framework
//! - **Brotli Compression**: Static and dynamic Brotli compression
//!
//! ## Quick Start
//!
//! ```rust,ignore
//! use rusty_ssr::prelude::*;
//!
//! #[tokio::main]
//! async fn main() {
//! // Initialize the SSR engine
//! let engine = SsrEngine::builder()
//! .bundle_path("ssr-bundle.js")
//! .pool_size(num_cpus::get())
//! .cache_size(300)
//! .build_engine()
//! .expect("Failed to create SSR engine");
//!
//! // Render a page
//! let html = engine.render("/home").await.unwrap();
//! println!("{}", html);
//! }
//! ```
//!
//! ## Architecture
//!
//! ```text
//! Request → SSR Cache (L1 hot → L2 cold) → V8 Pool → Response
//! ↑ ↓
//! └──────── cache result ──────┘
//! ```
//!
//! ## Performance
//!
//! - **73,000+ req/s** with caching enabled
//! - **Sub-millisecond** cache hit latency (~0.2ms)
//! - **10-15x faster** than Node.js SSR solutions
// Re-export commonly used types
pub use ;
pub use SsrEngine;
pub use ;
/// Configuration types and builder
/// Main SSR engine
/// Error types
/// V8 thread pool for parallel rendering
/// Multi-tier caching system
/// Axum middleware (brotli, etc.)
/// Prelude module for convenient imports