High-performance, versatile, asynchronous Rust web framework designed for data science and computing science applications.
use fluxor::prelude::*;
fn hello(_req: Req, _params: Params) -> Reply {
boxed(async {
Ok(Response::builder()
.header("Content-Type", "text/html; charset=UTF-8")
.body(Body::from("<h1>đź‘‹ Hello, World!</h1>"))
.unwrap())
})
}
#[tokio::main]
async fn main() {
let mut app = Fluxor::new(); // Initialize the application.
app.route(GET, "/", hello); // Set the route (method, path, handler).
app.run("127.0.0.1", "8080").await; // Start the HTTP server (host, port).
}
Core, Client, Data, Math, Cans, Wtime, Fluxio—versatile and well-structured modules tailored to a wide range of needs.
Client module for quick API testing—suitable for basic testing and requires no external tools.
Data module optimized for seamless interaction with MySQL, supporting effective database management.
Includes Math for computations and Wtime for time-related functionalities, enhancing high performance and productivity.
Cans template engine offers elegant, lightweight, and robust web content rendering with regional and MIME type support.
Fluxor CLI offers rapid project scaffolding and management of Rust projects in data science and computing.