speed-rs-core
A core HTTP Server implementation for Rust.
Installation
Create a new Rust project using cargo
cargo new your-project
Add the package to your project
cargo add speed-rs-core
Or add the following line to the dependencies in your Cargo.toml
file:
[dependencies]
...
speed-rs-core = "0.4.1"
Finally build the project
cargo build
Now you can use the package freely.
How To Use
speed-rs-core
provides just the core HTTP handling, so you will need to handle the higher-level abstractions. Below is an example of how to respond with an HTML file to the client when there is a request:
use fs;
use ;
[!NOTE] For more details, you can checkout this guide.
Development Guide
To further develop this package and leverage the powerful features of Rust, you can implement traits like RequestParamsExtractor
for additional functionalities:
use HashMap;
use HttpRequest;
// In your server's request handler
server.insert_handler;
License
Distributed under the MIT License. See LICENSE
for more information.