#async #compio #hyper #net #http #service #adaptor

cyper-core

Core adaptors and services for compio running on hyper

12 releases

0.2.0 Nov 21, 2024
0.1.3 Oct 4, 2024
0.1.1 Sep 26, 2024
0.1.0-beta.3 Mar 30, 2024
0.1.0-beta.1 Nov 18, 2023

#2 in #adaptors

Download history 66/week @ 2024-09-06 48/week @ 2024-09-13 819/week @ 2024-09-20 203/week @ 2024-09-27 325/week @ 2024-10-04 49/week @ 2024-10-11 7/week @ 2024-10-18 10/week @ 2024-10-25 74/week @ 2024-11-01 32/week @ 2024-11-08 185/week @ 2024-11-15 102/week @ 2024-11-22 37/week @ 2024-11-29

366 downloads per month
Used in 3 crates (2 directly)

MIT license

19KB
350 lines

Cyper

MIT licensed crates.io docs.rs Check Test

An HTTP library based on compio and hyper.

This project references code from reqwest.

Quick start

Add compio and cyper as dependency:

compio = { version = "0.12.0", features = ["macros"] }
cyper = "0.1.0"

Then we can start a simple HTTP request:

use cyper::Client;

#[compio::main]
async fn main() {
    let client = Client::new();
    let response = client
        .get("https://www.example.com/")
        .unwrap()
        .send()
        .await
        .unwrap();
    println!("{}", response.text().await.unwrap());
}

Features

  • HTTPS - powered by compio-tls
    • native-tls
    • rustls
  • HTTP 2
  • HTTP 3 - powered by compio-quic
  • cookies
  • charset
  • serde-json
  • compression
    • gzip
    • brotli

Contributing

There are opportunities to contribute to Cyper at any level. It doesn't matter if you are just getting started with Rust or are the most weathered expert, we can use your help. If you have any question about Cyper, feel free to join our telegram group. Before contributing, please checkout our contributing guide.

Dependencies

~15–27MB
~519K SLoC