4 ms·
Why I'm building a new async runtime
- animalnewbie 7y agoI wonder how it would be if Rust, like Scala came with a very basic executor? For me external crates no matter how popular, seem a no-go because of them constantly changing.
- hderms 7y agoNot familiar enough with rust to say, but this is an interesting comment given I've taken Scala for granted, in a sense
- tym0 7y agoIf my memory serves right, there is one in std but it's too simple for most use cases.
- majewsky 7y agoNo. As of now, std does not contain any executors. Only the minimal machinery that the compiler needs to know about in order to translate async code into structs implementing the Future trait. I think we will see an executor in std at some point, but seeing how executor design is still an ongoing area of research, it's really good that they didn't include an executor in std prematurely.
- Ericson2314 7y agoWell that was a tease. I suppose the title didn't actual promise me I could read some code, though.
- sdegutis 7y agoOn the note of runtimes that are “outside the boxes” of tokio and async-std, I found a really cool generator lib [0] for Rust that uses async/await (and has macro API to hide this if you want) but implements an extremely simple runtime that just implements the semantics of generators. I thought it was absolutely genius and underrated. [0] https://lib.rs/crates/genawaiter https://lib.rs/crates/genawaiter