genawaiter
staged
genawaiter | staged | |
---|---|---|
11 | 6 | |
428 | 125 | |
- | - | |
0.0 | 7.9 | |
almost 2 years ago | 25 days ago | |
Rust | TeX | |
- | MIT License |
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.
genawaiter
-
Letlang — Roadblocks and how to overcome them - My programming language targeting Rust
Yes, Letlang is translated to Rust and the runtime is implemented in Rust, using tokio and genawaiter. The compiler itself is also built in Rust.
-
Hey Rustaceans! Got a question? Ask here (7/2023)!
(note that genawaiter itself doesn't support no_std environments, but there's a merge request for that.)
- What is the next big thing coming to Rust
-
A personal list of Rust grievances
> `async` to make fake generators.
Genawaiter[0] is one of them.
[0]: https://github.com/whatisaphone/genawaiter
-
Generalizing coroutines - The Rust Language Design Team
Are you aware of the genawaiter crate?
-
Do not wait for Rust generators
A warning though: genawaiter doesn't seem to be maintained. The last commit is 2 years old, and issues are not active (I opened one that I find somewhat critical: https://github.com/whatisaphone/genawaiter/issues/35).
-
Hey Rustaceans! Got an easy question? Ask here (46/2021)!
There's e.g. https://github.com/whatisaphone/genawaiter, but you can also use yield directly (https://doc.rust-lang.org/beta/unstable-book/language-features/generators.html).
- What feature would you like to see implemented/stabilized?
- What's the outlook on generator functions in Rust?
-
Generators in Rust?
If you're interested in something that can be used right now, on stable, you should take a look at the genawaiter crate, it reimplements generators with async.
staged
-
A personal list of Rust grievances
I think it's more a reflection of how Rust evolved, and the techniques and approaches known and understood at the time and the strangeness budget they were (understandably) willing to take on at the time as opposed to something inherent. And also sometimes having separate, complicated features for similar things (as opposed to simple features that compose powerfully) can be useful pedagogically as well.
At any rate, this is something I'm interested in, and so that's why it appears so high up on my list. Often you really do want sub-languages for different purposes, but managing how they interact and work together, what is the same and what is different, and how that impacts usability is interesting (and difficult) part. I feel like it should be possible to do this, but it's going to take some work and there's still lots of unknowns.
In technical terms, I'm interested in dependently typed module systems, multistage programming[1], graded modal type theory[2], elaborator reflection, and two level type theory[3]. These all sound pretty intimidating, but you can actually see glimmers of some of this stuff in how Zig handles type parameters and modules, for example, something that most programmers really like the first time they see it!
I do feel like there is the core of a simple, flexible, powerful systems language out there... but finding it, and making it approachable while maintaining a solid footing in the theory and being sensitive to the practical demands of systems programming is a nontrivial task, and many people will be understandably skeptical that this is even a good direction to pursue. Thankfully the barrier to entry for programming language designers to implementing languages in this style has reduced significantly in just the last number of years[4], so I have hope that we might see some interesting stuff in the coming decade or so. In the meantime we have Rust as well, which is still an excellent language. I'm just one of those people who's never content with the status quo, always wishing we can push the state of the art further. This is why I got excited by Rust in the first place! :)
[1]: https://github.com/metaocaml/metaocaml-bibliography
[2]: https://granule-project.github.io/
[3]: https://github.com/AndrasKovacs/staged
[4]: https://github.com/AndrasKovacs/elaboration-zoo/
-
Staged push/pull fusion with typed Template Haskell
But, to give some background, I started writing this code in my 2LTT prototype, where staging is seamlessly integrated. There, quotes and splices are almost always inferred, there is automatic conversion between runtime and functions and their staged versions (e.g. + : Int -> Int -> Int can be used as + : Up Int -> Up Int -> Up Int), and there are no module or scoping restrictions.
-
what meta programming approach to use in a new systems PL
If you're into type theory, I think two-level type theory is a good foundation for a dependently typed systems language, but if you don't want to get into types just copying Zig gives you the best generics/metaprogramming model in any systems language imo.
-
References for the theory behind Zig's comptime?
Related to this is two-level type theory (which can be extended to n-level type theory). This can be used to make a dependently typed, staged programming language: https://github.com/AndrasKovacs/staged
-
Literature about mixing compile time and runtime code.
Andras Kovacs' staged demo is worth a look. It uses ‘two-level type theory’ to define a compile time and runtime languages that can be used together in the same program.
- Using Two-Level Type Theory for Staged Compilation (abstract)
What are some alternatives?
rust-rdkafka - A fully asynchronous, futures-based Kafka client library for Rust based on librdkafka
elaboration-zoo - Minimal implementations for dependent type checking and elaboration
kbio - Another Async IO Framework based on io_uring
polonius - Defines the Rust borrow checker.
rocket-lamb - A crate to allow running a Rocket webserver as an AWS Lambda Function with API Gateway or an Application Load Balancer
generator-rs - rust stackful generator library
srgb.rs - Implementation of sRGB primitives and constants
its_rusty - learning rust
lang-team - Home of the Rust lang team
rust - Empowering everyone to build reliable and efficient software.
creusot - Creusot helps you prove your code is correct in an automated fashion. [Moved to: https://github.com/creusot-rs/creusot]