rblink

Crates.iorblink
lib.rsrblink
version0.1.0
created_at2025-05-22 20:16:11.251991+00
updated_at2025-05-22 20:16:11.251991+00
descriptionA minimal HTTP server written in pure Rust
homepage
repositoryhttps://github.com/mi66mc/rblink
max_upload_size
id1685579
size9,719
mi66mc (mi66mc)

documentation

README

๐Ÿ”— 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.

Commit count: 3

cargo fmt