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
95
96
97
98
// webrust/src/lib.rs
//! # WebRust - Python-like Rust for Web Applications
//!
//! WebRust brings Python's ergonomic syntax to Rust, enabling rapid development of
//! web-based GUI applications with zero runtime overhead.
//!
//! ## SQL Support (Optional)
//!
//! Enable SQL analytics with the `sql` feature:
//!
//! ```toml
//! [dependencies]
//! webrust = { version = "1.3.0", features = ["sql"] }
//! ```
//!
//! Then use SQL queries:
//!
//! ```rust,ignore
//! use webrust::prelude::*;
//!
//! #[gui]
//! fn main() {
//! query("SELECT * FROM generate_series(1, 10) AS t(x)");
//! }
//! ```
//!
//! **Note**: The `sql` feature adds DuckDB (~5-10 min first compile).
//! Without it, WebRust compiles in ~30 seconds.
//!
//! ## Modules
//!
//! - [`io`] - Input/output operations: styled printing, user input, GUI server
//! - [`iter`] - Python-like iteration: ranges, enumerate, comprehensions
//! - [`viz`] - Data visualization: tables, charts, string methods
//! - [`graphic`] - Turtle graphics and object animations
//! - [`layout`] - Grid layouts and coordinate systems
//! - [`db`] - SQL queries with DuckDB (requires `sql` feature)
//! - [`text`] - String manipulation utilities
//! - [`prelude`] - Re-exports commonly used items
//!
//! ## Core Features
//!
//! - **F-string interpolation**: `println("Value: {x}, Result: {x * 2}")`
//! - **Python-like ranges**: `0.to(10)`, `'a'.to('z')`, `0.to(100).by(5)`
//! - **Comprehensions**: `.when(predicate).then(mapper)` for filtering and mapping
//! - **Interactive charts**: Line, bar, pie, radar, and more with ECharts
//! - **Smart tables**: Automatic formatting from any serializable data
//! - **SQL analytics** (optional): DuckDB integration with streaming HTML table output
//! - **LaTeX rendering**: Mathematical expressions with MathJax
//! - **Turtle graphics**: Visual programming with animations
//! - **Styled output**: Colors, borders, alignment, positioning
//!
//! The `#[gui]` attribute macro transforms any function into a web application
//! with automatic server setup and browser launch.
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use itoa;
pub use ryu;
pub use serde;
pub use serde_json;