async-std VS rustls

Compare async-std vs rustls and see what are their differences.

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
async-std rustls
19 57
3,833 5,417
0.9% 3.3%
5.3 9.9
2 months ago 5 days ago
Rust Rust
Apache License 2.0 GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

async-std

Posts with mentions or reviews of async-std. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-03.
  • Stabilizing async fn in traits in 2023 | Inside Rust Blog
    5 projects | /r/rust | 3 May 2023
    But maybe check out the discussion here https://github.com/async-rs/async-std/pull/631 or something (the blog post was linked on the end of it)
  • Anyone using io_uring?
    8 projects | /r/rust | 18 Aug 2022
    Have a look at these: https://github.com/async-rs/async-std/tree/main/examples
  • Any plans for built-in support of Vec2/Vec3/Vec4 in Rust?
    11 projects | /r/rust | 29 Jul 2022
    In fact, there are a lot of crates in Rust where in other programming languages, it would be included in the standard library. Examples are regex, random number generators, additional iterator methods, macros for other collections, num traits, loggers, HTTP libraries, error handling, async runtimes, serialization and deserialization, date and time, and many more.
  • 18 factors powering the Rust revolution, Part 2 of 3
    13 projects | dev.to | 10 Apr 2022
    Two major projects (non std lib but extremely commonly used) stand out in the area of async programming: Async std and Tokio - no doubt familiar to anyone that has turned an eye towards Rust for a second too long. Async architecture in general is likely very familiar to JavaScript programmers but in Rust there are some extra considerations (like ownership of the data that is thrown into an async function). Tokio is fast becoming a heavily supported and road tested async framework, with a thread scheduling runtime "baked in" that has learned from the history of Go, Erlang, and Java thread schedulers.
  • What are the side-effects of using different runtimes in the same codebase?
    2 projects | /r/rust | 21 Feb 2022
    Ah... https://github.com/tokio-rs/tokio and https://github.com/async-rs/async-std ?
  • Hey Rustaceans! Got an easy question? Ask here (51/2021)!
    7 projects | /r/rust | 21 Dec 2021
    async-std: Basically a Tokio alternative with a few different design decisions.
  • Why asynchronous Rust doesn't work
    3 projects | /r/programming | 13 Nov 2021
    Go's solution is for the scheduler to notice after a while when a goroutine has blocked execution and to shift goroutines waiting their turn to another thread. async-std pondered a similar approach with tasks, but it proved controversial and was never merged.
  • Building static Rust binaries for Linux
    6 projects | dev.to | 17 Oct 2021
    This indicates curl, zlib, openssl, and libnghttp2 as well as a bunch of WASM-related things are being dynamically linked into my executable. To resolve this, I looked at the build features exposed by surf and found that it selects the "curl_client" feature by default, which can be turned off and replaced with "h1-client-rustls" which uses an HTTP client backed by rustls and async-std and no dynamically linked libraries. Enabling this build feature removed all -sys dependencies from androidx-release-watcher, allowing me to build static executables of it.
  • Rust async is colored, and that’s not a big deal
    4 projects | /r/rust | 14 Mar 2021
    And also, the actual PR never got merged.
  • Rust's async isn't f#@king colored!
    4 projects | /r/rust | 10 Mar 2021
    Async in rust needs a runtime (aka executor) to run. You can maybe get a better description from the rust docs. As an example, Tokio attempts to provide an interface for a developer that is minimal change to the more common blocking code. So you'd end up putting #[tokio::main] above your main function to spin up the executor and most of the rest of the code is similar to a non-async version with a few sprinkles of .await, which you can see in the hello world for tokio. In contrast, async-std provides a more hands-on/low-level approach. If you are unlucky enough to have libraries that choose different stacks to work on, you'll possibly (probably?) have to handle both.

rustls

Posts with mentions or reviews of rustls. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-28.
  • Pingora: HTTP Server and Proxy Library, in Rust, by Cloudflare, Released
    6 projects | news.ycombinator.com | 28 Feb 2024
  • Alternative to openssl for reqwest https with client certs.
    3 projects | /r/rust | 8 Dec 2023
  • rustls 0.22 is out with pluggable crypto providers and better CRL support
    1 project | /r/rust | 4 Dec 2023
  • Exploring the Rust compiler benchmark suite
    1 project | /r/rust | 22 Aug 2023
    The RustTLS project is currently setting up their own CI benchmarking workflow, so I think that you could find some inspiration there: https://github.com/rustls/rustls/issues/1385 and https://github.com/rustls/rustls/issues/1205.
  • What are the scenarios where "Rewrite it in Rust" didn't meet your expectations or couldn't be successfully implemented?
    16 projects | /r/rust | 9 Jun 2023
    I also studied this question on FFI several weeks ago in terms of "rewrite part of the system in Rust". Unexpected results could be semantic issues (e.g., different error handling methods) or security issues (FFI could be a soundness hole). I suggest going through the issues of libraries that have started rewriting work such as rust-openssl or rustls (This is the one trying to rewrite in whole rust rather than using FFI; however, you will not be able to find the mapping function in the C version and compare them). I hope this helps!
  • A brief guide to choosing TLS crates
    5 projects | /r/rust | 9 Jun 2023
    Now for rust implementation of tls. Certificates can be loaded in two ways. * Finds and loads certificates using OS specific tools3 * Uses a rust implementation of webpki4 for loading with certificates5
  • Microsoft is busy rewriting core Windows library code in memory-safe Rust
    2 projects | news.ycombinator.com | 27 Apr 2023
    > Ring is mostly C/Assembly

    Crypto needs to be written in Assembly to ensure that operations take a constant time, regardless of input. Writing it in a high level language like C or Rust opens you up to the compiler "optimising" routines and making them no longer constant time.

    But you already knew this. And you also knew that the security audit (https://github.com/rustls/rustls/blob/master/audit/TLS-01-re...) of ring was favourable

    > No issues were found with regards to the cryptographic engineering of rustls or its underlying ring library. A recommendation is provided in TLS-01-001 to optionally supplement the already solid cryptographic library with another cryptographic provider (EverCrypt) with an added benefit of formally verified cryptographic primitives. Overall, it is very clear that the developers of rustls have an extensive knowledge on how to correctly implement the TLS stack whilst avoiding the common pitfalls that surround the TLS ecosystem. This knowledge has translated reliably into an implementation of exceptional quality.

    You said

    > a standard library with feature flags and editions would make rust ridiculously much more productive

    What's the difference between opting into a library with a feature flag and opting in with a line in Cargo.toml? Let's say you want to use the de-facto regex library. Would it really be ridiculously productive if you said you wanted the "regex" feature flag instead of the "regex" crate?

    I do agree that the standard library does need a versioning story so they can remove long deprecated functions. Where it gets complicated is if a new method is reintroduced using the same name in a later edition.

  • gRPC with mutual TLS on IPs only
    1 project | /r/openssl | 2 Apr 2023
    I used the commands listed in the .sh file here: https://github.com/rustls/rustls/tree/main/test-ca to generate keys/certs for a server and a client (with IP.1 records for SANs). I have added the local root CA to the trust store of each VM.
  • rustls 0.21 released with support for IP address server names
    1 project | /r/rust | 29 Mar 2023
    This is great news, this was our single biggest annoyance with rustls. One of our cloud providers choses to issue their hosted postgres instances with TLS certificates with IP addresses. Unusual, but valid per the spec, so why not. Apparently a practise that's also popular in kubernetes settings, so I'm somewhat surprised it took 5 years to close the issue, but now I can finally recommend people to use rustls without mentioning any gotchas.
  • Is Rust really safe? How to identify functions that can potentially cause panic
    6 projects | /r/rust | 12 Mar 2023
    I believe it is more relevant than you think: servers running in containers, web assembler tasks running in browsers, embedded devices and kernels with total control of the system, all have the ability to do something more sensible than plain out SIGABRT or similar, and in many the case is not that the complete system is falling down. For example RustTLS is looking into allowing fallible allocators and as a pretty general-purpose library that seems like a nice feature. I do wish ulimit -v worked in a sensible manner with applications.

What are some alternatives?

When comparing async-std and rustls you can also consider the following projects:

tokio - A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

rust-native-tls

actix-web - Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.

rust-openssl - OpenSSL bindings for Rust

smol - A small and fast async runtime for Rust

mkcert - A simple zero-config tool to make locally trusted development certificates with any names you'd like.

futures-rs - Zero-cost asynchronous programming in Rust

ring - Safe, fast, small crypto using Rust

reqwest - An easy and powerful Rust HTTP Client

webpki - WebPKI X.509 Certificate Validation in Rust

embassy - Modern embedded framework, using Rust and async.

rust-crypto - A (mostly) pure-Rust implementation of various cryptographic algorithms.