Async Lightweight HTTP client using system native library if possible. (Currently under heavy development)

Overview

Async Lightweight HTTP Client (aka ALHC)

github.com crates.io docs.rs

What if we need async but also lightweight http client without using such a large library like reqwest, isahc or surf?

ALHC is a async http client library that using System library to reduce binary size and provide async request feature.

Our little request example https with release build can be 182 KB, which is smaller than tinyget's http example. If we use rustc nightly feature plus build-std and panic_immediate_abort, it'll be incredibly 60 KB!

Currently work in progress and only support Windows (Using WinHTTP) and macOS in progress (Using CFNetwork), linux are planned.

Compilation binary size comparison

Note: the size optimization argument is: cargo +nightly run --release -Z build-std=core,alloc,std,panic_abort -Z build-std-features=panic_immediate_abort --target [TARGET] --example [EXAMPLE] and some configuration in Cargo.toml

Name Windows (x86_64) Windows (i686) Windows (aarch64) macOS (x86_64) macOS (aarch64) Linux (x86_64)
example https 397,824 284,160 296,960 1,044,008 1,250,051 WIP
example https release 181,760 187,904 200,192 596,040 570,515 /
example https release with size optimization 60,416 52,224 59,392 88,736 89,048 /
example parallel 520,704 376,320 393,216 1,321,192 1,573,398 /
example parallel release 195,072 211,456 229,888 627,760 619,702 /
example parallel release with size optimization 66,560 58,880 66,560 105,208 105,784 /
example sequential 402,432 289,280 302,080 1,041,424 1,244,408 /
example sequential release 185,344 191,488 203,264 593,072 566,888 /
example sequential release with size optimization 62,464 54,784 60,928 88,776 89,224 /
You might also like...
HTTP 2.0 client & server implementation for Rust.

H2 A Tokio aware, HTTP/2 client & server implementation for Rust. More information about this crate can be found in the crate documentation. Features

rustodrive is a rust client library for communicating with ODrives using the CAN protocol.

rustodrive is a WIP client library for communicating with ODrives using the CAN protocol. It is more than a simple CAN sender/receiver and has many co

RedisLess is a fast, lightweight, embedded and scalable in-memory Key/Value store library compatible with the Redis API.

RedisLess is a fast, lightweight, embedded and scalable in-memory Key/Value store library compatible with the Redis API.

Affine-client is a client for AFFINE based on Tauri
Affine-client is a client for AFFINE based on Tauri

Affine Client affine-client is a client for AFFINE based on Tauri Supported Platforms Windows Linux MacOS Download https://github.com/m1911star/affine

🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL.

SQLx 🧰 The Rust SQL Toolkit Install | Usage | Docs Built with ❤️ by The LaunchBadge team SQLx is an async, pure Rust† SQL crate featuring compile-tim

TDS 7.2+ (mssql / Microsoft SQL Server) async driver for rust

Tiberius A native Microsoft SQL Server (TDS) client for Rust. Supported SQL Server versions Version Support level Notes 2019 Tested on CI 2017 Tested

Simple, async embedded Rust

Cntrlr - Simple, asynchronous embedded Cntrlr is an all-in-one embedded platform for writing simple asynchronous applications on top of common hobbyis

An async executor based on the Win32 thread pool API

wae An async executor based on the Win32 thread pool API use futures::channel::oneshot; #[wae::main] async fn main() { let (tx, rx) = oneshot::ch

Async positioned I/O with io_uring.

uring-positioned-io Fully asynchronized positioned I/O with io_uring. Basic Usage let files = vec![File::open("test.txt").unwrap()]; let context = Uri

Owner
SteveXMH
A programmer with fresh mind and ❤️
SteveXMH
Cassandra (CQL) driver for Rust, using the DataStax C/C++ driver under the covers.

cassandra-cpp This is a maintained Rust project that exposes the DataStax cpp driver at https://github.com/datastax/cpp-driver/ in a somewhat-sane cra

null 93 Jan 7, 2023
lightweight, async and zero-copy KV Store

KipDB 介绍 网络异步交互、零拷贝的轻量级KV数据库 基于PingCAP课程talent-plan 课程地址:https://github.com/pingcap/talent-plan/tree/master/courses/rust 内置多种持久化内核 HashStore: 基于哈希 Sle

Kould 34 Dec 18, 2022
Some bunch of test scripts to generate a SQLite DB with 1B rows in fastest possible way

To find out the fastest way to create an SQLite DB with 1B random rows.

null 309 Dec 20, 2022
rust_arango enables you to connect with ArangoDB server, access to database, execute AQL query, manage ArangoDB in an easy and intuitive way, both async and plain synchronous code with any HTTP ecosystem you love.

rust_arango enables you to connect with ArangoDB server, access to database, execute AQL query, manage ArangoDB in an easy and intuitive way, both async and plain synchronous code with any HTTP ecosystem you love.

Foretag 3 Mar 24, 2022
A firebase HTTP v1 client implementation in Rust using google-authz

firebase-client A firebase HTTP v1 client implementation in Rust using the google_authz library. Example There are two ways to send notifications, one

Mobiltracker 2 Dec 14, 2022
High-level async Cassandra client written in 100% Rust.

CDRS tokio CDRS is production-ready Apache Cassandra driver written in pure Rust. Focuses on providing high level of configurability to suit most use

Kamil Rojewski 73 Dec 26, 2022
The rust client for CeresDB. CeresDB is a high-performance, distributed, schema-less, cloud native time-series database that can handle both time-series and analytics workloads.

The rust client for CeresDB. CeresDB is a high-performance, distributed, schema-less, cloud native time-series database that can handle both time-series and analytics workloads.

null 12 Nov 18, 2022
Dataloader-rs - Rust implementation of Facebook's DataLoader using async-await.

Dataloader Rust implementation of Facebook's DataLoader using async-await. Documentation Features Batching load requests with caching Batching load re

cksac 229 Nov 27, 2022
Lightweight unifying client for RPC + BanksClient

Ellipsis Client Lightweight unifying client for RPC + BanksClient There are no good unifying traits for Solana Rust clients. EllipsisClient creates a

Ellipsis Labs 16 Dec 24, 2022
Plugin for macro-, mini-quad (quads) to save data in simple local storage using Web Storage API in WASM and local file on a native platforms.

quad-storage This is the crate to save data in persistent local storage in miniquad/macroquad environment. In WASM the data persists even if tab or br

ilya sheprut 9 Jan 4, 2023