Skip to content

Minamo is a learning project that implements an HTTP/1.1 client using only the Rust standard library

Notifications You must be signed in to change notification settings

sophiabiscottini/minamo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌊 Minamo

水面 (minamo) — The water's surface.

A minimalist, synchronous HTTP/1.1 client written from scratch in Rust.
No dependencies. Just std.


What is this? (´• ω •`)

Minamo is a learning project that implements an HTTP/1.1 client using only the Rust standard library. No reqwest, no hyper, no curl bindings ~ just raw TCP sockets and hand-crafted HTTP messages.

Like touching the surface of a calm lake, each request creates ripples that travel through the network and return with a response.

Features

  • ✅ HTTP/1.1 GET requests
  • ✅ Response parsing (status, headers, body)
  • ✅ Clean CLI with pretty output
  • ✅ Zero external dependencies
  • ✅ Timeouts and error handling
  • ❌ HTTPS (TLS is scary... for now 😅)
  • ❌ Other HTTP methods (POST, PUT, etc.)
  • ❌ Keep-alive connections

Installation

git clone https://github.com/sophiabiscottini/minamo.git
cd minamo
cargo build --release

Usage

# Basic request
minamo http://example.com/

# Get help
minamo --help

# Check version
minamo --version

Example Output

🌊 Connecting to http://example.com/...

✅ HTTP/1.1 200 OK

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📡 Status: HTTP/1.1 200 OK
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📋 Headers:
   content-type: text/html
   content-length: 1256

📄 Body:
────────────────────────────────────────
<!doctype html>
<html>
...
</html>
────────────────────────────────────────

Project Structure

minamo/
├── Cargo.toml
└── src/
    ├── main.rs    # CLI entry point
    ├── lib.rs     # Public API (Minamo::get, etc.)
    ├── http.rs    # Request & Response structs
    └── net.rs     # TCP transport layer

As a Library

You can also use Minamo as a library in your own projects:

use minamo::Minamo;

fn main() {
    match Minamo::get("http://example.com/") {
        Ok(response) => {
            println!("Status: {}", response.status_code);
            println!("Body: {}", response.body);
        }
        Err(e) => eprintln!("Request failed: {e}"),
    }
}

Why "Minamo"? (◕‿◕)

The name comes from Japanese 水面 (minamo), meaning "water's surface."

  • Physics & Nature: The water's surface is where the aerial world (the client, us) touches the submerged world (servers, data flow)
  • Calm: It evokes a tranquil lake. An HTTP request is like touching that surface, creating ripples that travel and return
  • Sound: It's soft, short (6 letters), and easy to remember

Limitations ヽ(°〇°)ノ

  • HTTP only: No HTTPS/TLS support (yet). Many modern sites require HTTPS, so you'll get connection errors or redirects
  • GET only: Only GET requests are implemented
  • No redirects: If a server returns 301/302, Minamo won't follow it automatically
  • No chunked encoding: We expect Content-Length or connection close

Contributing

This is primarily a learning project, but PRs are welcome! Feel free to:

  • Add new features (POST? HTTPS? 👀)
  • Fix bugs
  • Improve documentation

License

MIT © 2025 Sophia (Biscottini)


Made with 💜 and lots of \r\n

About

Minamo is a learning project that implements an HTTP/1.1 client using only the Rust standard library

Topics

Resources

Stars

Watchers

Forks

Languages