GPRS
GPRS provides a curated selection of optimized Rust libraries as a modular foundation for modern web frameworks. Each crate acts as a distinct module, enabling seamless integration and customization. With version control on each crate, developers gain greater stability and flexibility, enhancing maintainability and scalability while harnessing Rust's power for high-performance web applications.
Table of Contents
Installation
Run the following Cargo command in your project directory:
cargo add gprs
Or add gprs to your Cargo.toml file:
[]
= "MAJOR.MINOR.PATCH" # Replace with the latest version
Changelog
Usage
use task;
// use gprs::cans::do_html;
use ;
use status_map;
use Duration;
async
pub const HEAD: &str = r#"<head>
<meta charset="UTF-8">
<title>{{page_title}} Page</title>
</head>"#;
pub const HOME_TEMPLATE: &str = r#"<!DOCTYPE html>
<html>
{{HEAD}}
<body>
Home Page
</body>
</html>"#;
pub const ABOUT_TEMPLATE: &str = r#"<!DOCTYPE html>
<html>
{{HEAD}}
<body>
About Page
</body>
</html>"#;
async
Result
3
2
1
Hello, World!
Status Code: 200, Message: OK
Home Page
Home Page
GPRS | Home Page
👋 Hello, World!
x ≠ 1 & x ≠ 2. The 'x' value is ( 3 )
123
123
About Page
About Page
1
2
3
Documentation
- asyncore crate docs
- cans crate
- chief crate
- ghttp crate docs
- mathlab crate (math module)
- parser module: serde crate
- parser module: serde_json crate
- regexy crate
- runtime module: tokio crate
- wtime crate
License
This project is licensed under either of the following licenses:
- MIT License
- Apache License, Version 2.0
You may choose either license for your purposes.
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue for any feature requests or bug reports.