https://github.com/believemanasseh/rusticore
A minimal multithreaded custom web server in Rust
https://github.com/believemanasseh/rusticore
concurrency http http-server multithreading web-server
Last synced: 9 months ago
JSON representation
A minimal multithreaded custom web server in Rust
- Host: GitHub
- URL: https://github.com/believemanasseh/rusticore
- Owner: believemanasseh
- License: mit
- Created: 2025-07-10T05:09:43.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-07-20T02:47:46.000Z (9 months ago)
- Last Synced: 2025-07-20T04:45:10.663Z (9 months ago)
- Topics: concurrency, http, http-server, multithreading, web-server
- Language: Rust
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rusticore
A minimal, customisable and multithreaded web server written in Rust.
## Features
- Simple API for starting and managing the server
- Configurable logging with [log4rs](https://crates.io/crates/log4rs)
- Supports both file and console logging
- Easily extensible for custom logic and routing
## Installation
### From Source
Clone the repository and build with Cargo:
```sh
git clone https://github.com/believemanasseh/rusticore.git
cd rusticore
cargo build --release
```
The compiled binary will be in `target/release/rusticore`.
### From crates.io
Add to your `Cargo.toml`:
```toml
[dependencies]
rusticore = "0.1.0"
```
Then run:
```sh
cargo build --release
```
## Usage
### As a Binary
After building, run the server:
```sh
./target/release/rusticore
```
### As a Library
Import and use in your Rust project:
```rust
use rusticore::Server;
use rusticore::Route;
fn main() {
let mut server = Server::new("localhost", 9000, false, None);
let route = Route::new("GET", "/hello", |req, res| {
res.send("Hello, world!");
});
server.add_route(route);
server.start();
}
```
## Testing
To run tests, use:
```sh
# Unit tests
cargo test --lib
# Integration tests
cargo test --test test_*
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.