News for hackers. Stuff that matters.
Re:Monoio – A thread-per-core Rust async runtime with io_uring by billconan on Thursday December 09, 2021 @12:57PM (#29500683)
I have a stupid question, why isn't an async runtime a language feature of rust? we don't seem to see so many async runtimes in other languages? They seem to have a default way to run async tasks?
Re:Monoio – A thread-per-core Rust async runtime with io_uring by pixel_fcker on Thursday December 09, 2021 @01:13PM (#29500873)
It sort of goes against Rust’s philosophy to bake anything like that into the language.

Where they screwed up was not providing the machinery to make libraries agnostic of the runtime an end user wants to use in their program, so libraries either depend on a specific runtime explicitly or use features to allow users to switch runtimes at compile time. This causes a lot of headaches for library maintainers and end users both.

There’s a lot of interest in adding said machinery (through collections of traits in std) to enable libraries to be generic over different runtimes, but a solution is still some ways off.

Re:Monoio – A thread-per-core Rust async runtime with io_uring by masklinn on Thursday December 09, 2021 @01:46PM (#29501265)
> I have a stupid question, why isn't an async runtime a language feature of rust?

Because it was considered inimical to the core values and purpose of the language, which is to be a systems language.

An async runtime being a language feature means a runtime is a language feature, and that is very much undesirable (in fact it used to be part of the language and was removed as it "settled" into its niche from its original design, which was much higher level and more applicative).

Re:Monoio – A thread-per-core Rust async runtime with io_uring by FerdSlav on Thursday December 09, 2021 @01:10PM (#29500838)
an async runtime inherently requires knowledge of the underlying system which Rust remains agnostic to. Rust can be written to target bare-metal (where no OS exists) to WASM and everything in between. If a runtime was added to the language itself you would inherently limit the flexibility of the platforms by which it could target.