https://github.com/arvid-berndtsson/rurl

Curl written in Rust

https://github.com/arvid-berndtsson/rurl

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.1%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Curl written in Rust

Basic Info
  • Host: GitHub
  • Owner: arvid-berndtsson
  • License: mit
  • Language: Rust
  • Default Branch: main
  • Size: 57.6 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Created over 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

rurl

A minimal HTTP client with no dependencies, similar to curl but written in Rust. It is designed to be simple, efficient, and easy to use for making HTTP requests from the command line.

Note: The package is published as rust-curl on crates.io, but the command you run is still rurl

Features

  • HTTP and HTTPS support with proper TLS handling
  • Custom headers
  • Request body data
  • Various HTTP methods (GET, POST, etc.)
  • Save response to file
  • Intelligent response handling for Content-Length and chunked transfers
  • Connection timeouts to prevent freezing or hanging
  • Verbose mode for debugging
  • Minimal memory usage with optimized buffer handling

Installation

From crates.io

bash cargo install rust-curl

From source

bash git clone https://github.com/arvid-berndtsson/rurl.git cd rurl cargo build --release && cargo install --path .

Usage

rurl [OPTIONS] <URL>

Options

  • -o, --output <FILE>: Save the response body to a file
  • -m, --method <METHOD>: HTTP method to use (default: GET)
  • -H, --header <HEADER>: Add a header to the request
  • -d, --data <DATA>: Add data to the request body
  • -v, --verbose: Enable verbose output with detailed status information
  • -h, --help: Display help message

Examples

```bash

Simple GET request

rurl https://arvid.tech

Verbose output with connection and response details

rurl -v https://example.com

POST request with JSON data

rurl -m POST -H "Content-Type: application/json" -d '{"key":"value"}' https://api.example.com

Save response to file

rurl -o response.html https://arvid.tech ```

Features and Behavior

  • Automatically follows the HTTP protocol rules for HTTP/1.1
  • Properly handles chunked transfer encoding
  • Adds 'Connection: close' to requests to ensure proper connection termination
  • Implements timeouts to prevent hanging during network issues
  • Limits maximum response size to prevent memory exhaustion
  • Provides detailed progress information in verbose mode

License

MIT

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any bugs, features, or improvements.

Acknowledgments

This project is inspired by the simplicity and power of curl, but aims to be written in a more idiomatic Rust style with a focus on minimalism and ease of use.

Owner

  • Name: Arvid Berndtsson
  • Login: arvid-berndtsson
  • Kind: user
  • Location: Sweden
  • Company: @LimeTip

Based in Malmö, Sweden, I specialize in software development and digital sustainability. Founder of @LimeTip and Co-Founder of @merely-emissions

GitHub Events

Total
  • Create event: 8
  • Issues event: 1
  • Release event: 1
  • Watch event: 1
  • Delete event: 6
  • Push event: 21
  • Pull request review comment event: 14
  • Pull request review event: 21
  • Pull request event: 16
Last Year
  • Create event: 8
  • Issues event: 1
  • Release event: 1
  • Watch event: 1
  • Delete event: 6
  • Push event: 21
  • Pull request review comment event: 14
  • Pull request review event: 21
  • Pull request event: 16

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 23
  • Total Committers: 1
  • Avg Commits per committer: 23.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 23
  • Committers: 1
  • Avg Commits per committer: 23.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Arvid Berndtsson 1****n 23

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 1
  • Total pull requests: 8
  • Average time to close issues: N/A
  • Average time to close pull requests: about 12 hours
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.13
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 8
  • Average time to close issues: N/A
  • Average time to close pull requests: about 12 hours
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.13
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • arvid-berndtsson (1)
Pull Request Authors
  • arvid-berndtsson (12)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cargo 1,287 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
crates.io: rust-curl

A minimal HTTP client with no dependencies

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,287 Total
Rankings
Dependent repos count: 22.0%
Dependent packages count: 29.1%
Average: 48.6%
Downloads: 94.8%
Maintainers (1)
Last synced: 12 months ago

Dependencies

.github/workflows/rust.yml actions
  • actions/checkout v4 composite
Cargo.lock cargo
  • bitflags 2.9.0
  • cc 1.2.19
  • cfg-if 1.0.0
  • core-foundation 0.9.4
  • core-foundation-sys 0.8.7
  • errno 0.3.11
  • fastrand 2.3.0
  • foreign-types 0.3.2
  • foreign-types-shared 0.1.1
  • getrandom 0.3.2
  • libc 0.2.172
  • linux-raw-sys 0.9.4
  • log 0.4.27
  • native-tls 0.2.14
  • once_cell 1.21.3
  • openssl 0.10.72
  • openssl-macros 0.1.1
  • openssl-probe 0.1.6
  • openssl-sys 0.9.107
  • pkg-config 0.3.32
  • proc-macro2 1.0.95
  • quote 1.0.40
  • r-efi 5.2.0
  • rustix 1.0.5
  • schannel 0.1.27
  • security-framework 2.11.1
  • security-framework-sys 2.14.0
  • shlex 1.3.0
  • syn 2.0.100
  • tempfile 3.19.1
  • unicode-ident 1.0.18
  • vcpkg 0.2.15
  • wasi 0.14.2+wasi-0.2.4
  • windows-sys 0.59.0
  • windows-targets 0.52.6
  • windows_aarch64_gnullvm 0.52.6
  • windows_aarch64_msvc 0.52.6
  • windows_i686_gnu 0.52.6
  • windows_i686_gnullvm 0.52.6
  • windows_i686_msvc 0.52.6
  • windows_x86_64_gnu 0.52.6
  • windows_x86_64_gnullvm 0.52.6
  • windows_x86_64_msvc 0.52.6
  • wit-bindgen-rt 0.39.0
Cargo.toml cargo