tyrade
A pure functional language for type-level programming in Rust (by willcrichton)
typic
Type-safe transmutations between layout-compatible types. (by jswrenn)
tyrade | typic | |
---|---|---|
5 | 2 | |
314 | 119 | |
- | - | |
0.0 | 0.0 | |
over 1 year ago | over 3 years ago | |
Rust | Rust | |
- | Apache License 2.0 |
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.
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.
tyrade
Posts with mentions or reviews of tyrade.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-05-01.
-
The Better Alternative to Lifetime GATs
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:
-
Type-level Bubble Sort in Rust: Part 2
A much more practically useful type-level programming in Rust A macro to define type-level logic with value-level syntax in Rust Type-level Brainfuck in Rust "Gentle Intro to Type-level Recursion in Rust" Type-level registers in Rust Type-level quicksort in Scala" Type-level sorting algorithms in Haskell A repo with functions and algorithms implemented purely on types in TypeScript
- Tyrade: Language for type-level programming in Rust
-
Generalizing over Generics in Rust (Part 1.5): Mechanisms
However, if I were starting over, I think I would take the approach of /u/entoros's tyrade project.
-
Generic associated types encode higher-order functions on types
https://github.com/willcrichton/tyrade#more-complex-example-session-and-list-types
typic
Posts with mentions or reviews of typic.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-02-23.
-
Generalizing over Generics in Rust (Part 1.5): Mechanisms
Seconding this! This is the approach I took while developing typic, a library that models Rust's repr(C) layout algorithm at a type-level. I would first sketch out my ideas in prolog, then translate that Prolog fairly mechanically to trait impls. I even started automating this translation. (The tricky bit is that you really need to strictly limit yourself to a subset of prolog, and maintain a fairly rigid style discipline, too.)
-
Generic associated types encode higher-order functions on types
I'd like to try to rewrite typic with tyrade, but I'd need to first swap out tyrade's peano-arithmetic number system for typenum's binary-arithmetic system.
What are some alternatives?
When comparing tyrade and typic you can also consider the following projects:
tinyvec - Just, really the littlest Vec you could need. So smol.
frunk - Funktional generic type-level programming in Rust: HList, Coproduct, Generic, LabelledGeneric, Validated, Monoid and friends.
alacritty - A cross-platform, OpenGL terminal emulator.
meta-typing - 📚 Functions and algorithms implemented purely with TypeScript's type system
chalk - An implementation and definition of the Rust trait system using a PROLOG-like logic solver
tauri - Build smaller, faster, and more secure desktop applications with a web frontend.
type-level-sort - im so smart please hire me
rust - Empowering everyone to build reliable and efficient software.
session-types
deno - A modern runtime for JavaScript and TypeScript.