claro

Crates.ioclaro
lib.rsclaro
version
sourcesrc
created_at2024-11-26 21:09:57.695045
updated_at2024-12-16 18:11:54.706569
descriptionA classic multi-threaded HTTP server
homepage
repositoryhttps://git.sr.ht/~eze-works/claro
max_upload_size
id1462327
Cargo.toml error:TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Eze Anyanwu (eze-works)

documentation

README

claro

⚠️ Work in progress ...

A simple, predictable HTTP/1.1 server

Hello world

use claro::{Response, Request};

let server = claro::listen("localhost:0", |_: &mut Request| {
    Response::plain_text("Hello, world!")
}).unwrap();

// use server.wait() to block until the server terminates
server.stop();

This library will be interesting to you if any of the following describe you:

  • You need a simple http server for your static site generator.
  • You are going to be putting your service behind a reverse proxy, so it does not need to speak anythinmg other than http/1.1
  • You despair at the lack of maintained non-async http servers in the Rust ecosystem.

Turn around if:

  • You expect that what your are building will need to maintain a "high" number of concurrent connections (what "high" here means is TBD).
Commit count: 0

cargo fmt