nim-lang / RFCs

A repository for your Nim proposals.
135 stars 26 forks source link

Support io_uring in stdlib #519

Open FedericoCeratto opened 1 year ago

FedericoCeratto commented 1 year ago

https://en.wikipedia.org/wiki/Io_uring is gaining traction as it provides fast async I/O with batching of both requests and responses on Linux. It can be used for both disk I/O and networking, see https://developers.redhat.com/articles/2023/04/12/why-you-should-use-iouring-network-io

(AFAIK people have been asking to have good support in Go and Rust and this could be an opportunity for Nim to get ahead a bit)

arnetheduck commented 1 year ago

How about developing it as a library first that it can gain traction without relying on the Nim development cycle?

FedericoCeratto commented 1 year ago

@arnetheduck The point of the RFC is to have a roadmap for inclusion in the stdlib. io_uring is pretty foundational and people should know where this is going before spending efforts adopting it in their projects.

arnetheduck commented 1 year ago

The point of the RFC is to have a roadmap for inclusion in the stdlib.

the easiest road for a library to be included is to establish its utility in real life, rather than an RFC - you'll be able to make a much stronger case for "this is foundational / important" for nim community to accept the maintenance overhead it will cause if indeed it sees wide use already.

ringabout commented 1 year ago

fyi, there is an io_uring implementation for Nim which looks promising => https://github.com/blackmius/nimuring