Skip to content

Rust HTTP client & server libraries #22

@247arjun

Description

@247arjun

HTTP client/server code

When scanning .toml files, specifically Cargo.toml files in Rust projects, for dependencies that indicate HTTP usage, I looked for crates that provide HTTP client or server functionalities.

Here are some common dependencies that I encountered when I did this search ~3 years ago (the version numbers are all almost certainly outdated):

HTTP Client Libraries

  • reqwest: A popular HTTP client library that provides a convenient, higher-level API for making HTTP requests. It is built on hyper.
    reqwest = "0.11"
  • hyper: A fast, low-level HTTP implementation written in Rust. While it can be used directly, it's also a building block for other HTTP clients and servers.
    hyper = "0.14"
  • surf: A lightweight, async HTTP client library that is part of the async-std ecosystem.
    surf = "2.2"
  • ureq: A simple, blocking HTTP client that is suitable for single-threaded applications.
    ureq = "2.1"
  • isahc: A versatile HTTP client with a focus on ease of use and safe defaults.
    isahc = "1.0"

The reqwest library

HTTP Server Libraries:

actix-web

A powerful, pragmatic, and extremely fast web framework for Rust.

actix-web = "3.0"

rocket

A web framework for Rust with a focus on ease-of-use, expressibility, and speed.

Rocket is an async backend web framework for Rust with a focus on usability, security, extensibility, and speed. Rocket makes it simple to write secure web applications without sacrificing productivity or performance.

rocket = "0.4" # 0.5 just released on 17-Nov-2023
  • warp: A composable web server framework that leverages the hyper library for underlying HTTP handling.
    warp = "0.3"
  • tide: A minimal and pragmatic Rust web application framework built on top of async-std.
    tide = "0.16"
  • gotham: A flexible web framework that does not sacrifice safety, security, or speed.
    gotham = "0.5"

HTTP Utilities and Middleware:

  • http: Provides types and traits for working with HTTP.
    http = "0.2"
  • tower: A library of modular and reusable components for building robust networking clients and servers.
    tower = "0.4"
  • tower-http: A collection of middleware and utilities for use with tower and hyper.
    tower-http = "0.1"

Asynchronous Runtimes:

While not HTTP-specific, asynchronous runtimes are often used in conjunction with async HTTP libraries. Look for:

  • tokio: A runtime for writing reliable, asynchronous, and slim applications with the Rust programming language.
    tokio = { version = "1.0", features = ["full"] }
  • async-std: An async port of the Rust standard library.
    async-std = "1.9"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions