1 unstable release
Uses new Rust 2024
new 0.1.0 | May 22, 2025 |
---|
#209 in HTTP server
86 downloads per month
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.