webrust 0.8.0

Python-like Rust for Web Applications - A bridge between Python simplicity and Rust power
Documentation

🌟 WebRust v0.8.0 - A Paradigmatic Synthesis

Bridging the expressiveness of Python with the robustness of Rust, while embracing the web as a first-class computational platform.

Rust License Web-First Python-Like Version Build


🎯 Foundational Principles

Simple Entry Point:

#[gui]
use webrust::prelude::*;
fn main() {
    println("Greetings from the web platform.");
}

✨ Notable Enhancements in Version 0.8.0

🎨 Sophisticated Typography and Layout System

// Centered announcements with visual emphasis
println("WebRust v0.8.0 Now Available")
    .width(*CW)
    .align("center")
    .weight(4)
    .color("gold")
    .background("navy");

// Contextual attribution with styling
println("Developed with dedication by the WebRust contributors")
    .width(*CW)
    .align("right")
    .color("crimson")
    .radius(15);

// Justified textual content for enhanced readability
println("WebRust facilitates sophisticated applications...")
    .width(*CW)
    .align("justify")
    .background("ghostwhite");

🧠 Pythonic Data Processing Constructs

// Numerical sequence transformations ✨
let squares: Vec<i32> = 0.to(10).then(|x| x * x);
// 🐍 Equivalent to Python: [x**2 for x in range(10)]

// Character-to-numeric mappings with type inference 🔄
let char_codes: HashMap<char, u8> = 'a'.to('f').then(|c| (c, c as u8));  
// 🐍 Equivalent to Python: {c: ord(c) for c in 'abcdef'}

// Conditional data processing with method chaining ⛓️
let filtered_squares: Vec<i32> = 0.to(100)
    .when(|&x| x % 2 == 0)    // Even numbers only
    .when(|&x| x % 3 == 0)    // Divisible by three
    .then(|x| x * x);         // Apply transformation

🔤 Comprehensive String Processing Interface

A complete implementation of Python's string manipulation methods, optimized for Rust's ownership model:

// Intelligent tokenization with contextual behavior 🎯
"python,rust,go".split_by(",")        // ["python", "rust", "go"]
"hello  world\ttab".split_by("")      // ["hello", "world", "tab"]  

// Case transformation utilities 🔄
"hello world".upper()                 // "HELLO WORLD"
"hello world".title()                 // "Hello World" 

// Fluent method composition ⛓️
"a,b,c".split_by(",").join(" → ")     // "a → b → c"

🎯 Contemporary Development Context


🚀 Getting Started

cargo install webrust
cargo new my_application --template webrust
cd my_application

🌈 Comprehensive Example Application

use webrust::prelude::*;

#[gui(bg = "linear-gradient(135deg, #667eea 0%, #764ba2 100%)", 
      fg = "white", font = "Inter", size = "16px")]
fn main() {
    println("@(cyan, bold)Welcome to WebRust Development");
    
    let user_name: String = input("Please enter your name:");
    let user_age: i32 = input("Please enter your age:");
    
    // Contextual string processing 🧠
    let greeting_message = match user_name.chars().next() {
        Some(c) if c.is_ascii_uppercase() && c <= 'M' => "Excellent choice of name!",
        _ => "Welcome to our community!"
    };
    
    // Professional presentation styling 🎨
    println("@(green){greeting_message} @(yellow){user_name}@(white), at @(orange){user_age}@(white) years of age.")
        .width(600)
        .align("center")
        .weight(2)
        .color("gold")
        .radius(10)
        .background("rgba(0,0,0,0.1)");
    
    // Mathematical expression rendering 🧮
    println("Numerical representation: $(\\text{age}_{10} = {user_age} = {user_age:b}_2)");
}

🏗️ Core Architectural Features


🎯 Target Developer Communities


📚 Documentation and Resources


🤝 Community Contribution

Development Environment Setup:

git clone https://github.com/gerarddubard/webrust.git
cd webrust
cargo test --all
cargo run --example demonstration

🗺️ Future Development Trajectory


📜 License and Usage Terms


🎯 Concluding Thoughts

🚀 Ready to Experience the Future?

cargo install webrust
cargo new next_generation_app --template webrust
cd next_generation_app
cargo run