The Better Alternative to Lifetime GATs

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • rust

    Empowering everyone to build reliable and efficient software.

  • It's saying "the lifetime 'this that is given to this GAT must be a shorter lifetime than Self's". We have to have this to enable implementations of LendingIterator to use types like &'this mut Self in their implementation of Item, since without it that would not be allowed (as there's nothing stopping users from setting 'this to 'static, creating a &'static mut Self which often is an invalid type). You can read more about it in this issue.

  • tinyvec

    Just, really the littlest Vec you could need. So smol.

  • funny indeed. i changed all my projects to use tinyvec

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • storages-api

  • The unfortunate asterisk to this is my work on the Storage api; with that abstraction Vec itself could be the small vector type rather than duplicating the entire API onto a second type.

  • tyrade

    A pure functional language for type-level programming in Rust

  • But there's no law of nature that says that Rust type-level syntax must suck forever. Maybe Rust 2036 will make writing this stuff a breeze, who knows. But for now, there are some projects that attempt to fill this gap, like Tyrade, which is a Rust DSL (like, a proc macro) that compiles down to bare Rust. It has seen some usage: there's a session types library built on top of Tyrade that is just awesome:

  • session-types

  • But there's no law of nature that says that Rust type-level syntax must suck forever. Maybe Rust 2036 will make writing this stuff a breeze, who knows. But for now, there are some projects that attempt to fill this gap, like Tyrade, which is a Rust DSL (like, a proc macro) that compiles down to bare Rust. It has seen some usage: there's a session types library built on top of Tyrade that is just awesome:

  • 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
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