Registry / web-framework / tiny-http

tiny-http

JSON →
library0.12.0rscratesunverified

Low level HTTP server library.

# Cargo.toml [dependencies] tiny_http = "0.12.0"
INSTALL
IMPORT
SIG · TINY-HTTP
T
tiny-http
web-frameworkrustv0.12.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Server
use tiny_http::Server;

Starts a simple HTTP server that responds with 'Hello, world!'.

use tiny_http::{Server, Response}; fn main() { let server = Server::http("0.0.0.0:8080").unwrap(); for request in server.incoming_requests() { let response = Response::from_string("Hello, world!"); request.respond(response).unwrap(); } }
Debug
Known issues
gotchaBlocking I/O; not suitable for high-concurrency without threading.
fix
Use multiple threads or an async HTTP server for high concurrency.
affects: >=0.12.0
Upgrade
Version history
0.12.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
tiny-http — cargo add tiny-http · libregistry