The bane of my existence: Supporting both async and sync code in Rust

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • stm32-hal

    This library provides access to STM32 peripherals in Rust.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • unasync

    The async transformation code.

    Nice! This is similar to the solution here: https://github.com/python-trio/unasync

  • rfcs

    RFCs for changes to Rust

    In the early days of Rust there was a debate about whether to support "green threads" and in doing that require runtime support. It was actually implemented and included for a time but it creates problems when trying to do library or embedded code. At the time Go for example chose to go that route, and it was both nice (goroutines are nice to write and well supported) and expensive (effectively requires GC etc). I don't remember the details but there is a Rust RFC from when they removed green threads:

    https://github.com/rust-lang/rfcs/blob/0806be4f282144cfcd55b...

  • k8s-openapi

    Rust definitions of the resource types in the Kubernetes client API

    Another option is to implement your API in a sans-io form. Since k8s-openapi was mentioned (albeit for a different reason), I'll point out that its API gave you a request value that you could send using whatever sync or async HTTP client you want to use. It also gave you a corresponding function to parse the response, that you would call with the response bytes however you got them from your client.

    https://github.com/Arnavion/k8s-openapi/blob/v0.19.0/README....

    (Past tense because I removed all the API features from k8s-openapi after that release, for unrelated reasons.)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Cultivating Open Source Community

    1 project | dev.to | 12 Jun 2024
  • Generics in Rust: murky waters of implementing foreign traits on foreign types

    2 projects | dev.to | 3 Jun 2024
  • Ask HN: What April Fools jokes have you noticed this year?

    1 project | news.ycombinator.com | 1 Apr 2024
  • Rust to add large language models to the standard library

    1 project | news.ycombinator.com | 1 Apr 2024
  • Why does Rust choose not to provide `for` comprehensions?

    1 project | news.ycombinator.com | 11 Mar 2024