#web-server #http #html #server

app rblink

A minimal HTTP server written in pure Rust

1 unstable release

Uses new Rust 2024

new 0.1.0 May 22, 2025

#209 in HTTP server

Download history 86/week @ 2025-05-17

86 downloads per month

Custom license

9KB
158 lines

๐Ÿ”— rblink โ€” A Simple Static File HTTP Server in Rust

rblink is a minimal HTTP server written in pure Rust that serves static files and directories over the GET method. It opens the browser automatically, displays a clean file listing, and runs without external dependencies.


๐Ÿš€ Features

  • ๐Ÿ“ Serves static files from the current directory
  • ๐Ÿงญ Clean directory listing in HTML
  • ๐Ÿ–ฅ๏ธ Auto-opens the browser on launch
  • ๐Ÿ’ก No external crates (pure std)
  • ๐Ÿ”’ GET-only HTTP support (status 405 on others)

๐Ÿงช Usage

cargo run <port>

Example:

cargo run 8080

This will:

  • Bind to 127.0.0.1:8080
  • Serve the current folder contents
  • Open your default browser pointing to http://127.0.0.1:8080 (if supported)

๐Ÿ“ Directory Listing

If no index.html is found in the current directory, rblink generates a minimal HTML page listing all files and folders, with icons:

๐Ÿ“ folder/
๐Ÿ“„ file.txt

Clicking any item navigates or opens it directly.


๐Ÿ›‘ Limitations

  • No MIME-type detection (files are returned as text)
  • No support for POST/PUT/DELETE
  • Synchronous, single-threaded request handling
  • No TLS (HTTP only)

๐Ÿง  Inspiration

This project was created for learning purposes and small local development use-cases (like previewing HTML folders).


๐Ÿ“„ License

MIT License.

No runtime deps