1. 59
  1. 12

    Isnt this… Really big?

    1. 15

      It does seem like it. This is, to my knowledge, the first hugely popular I/O library which now lets its users use io_uring in a way which just looks like normal async file I/O.

      Rust seems like it is in a special position in that it’s a language with good enough performance for io_uring to matter, but with powerful enough facilities to make clean abstractions on top of io_uring possible.

      1. 6

        Isn’t the problem that Rust bet the farm on readiness-based APIs and now it turns out (surprise) that completion-based APIs are generally “better” and finally coming to Linux (after Windows completely embarrassed Linux on that matter for like a decade).

        1. 1

          It’s not a problem in practice. Rust’s futures model handels io-uring just fine. There was some debate over how to handle “cancellations” of futures, e.g. when Rust code wants to just forget that it asked the OS for bytes from a TCP socket. But the “ringbahn” research prototype found a clean solution to that problem.

          Actually, that entire blog is a wealth of information about Rust futures.

          1. 1

            found a clean solution

            I’d call that a stretch, considering that the “solution” pretty much foregoes futures altogether (and with that async/await) and largely rolls its own independent types and infrastructure.

            So I’m not seeing how this is evidence for:

            futures model handels io-uring just fine

            I’d say its evidence of the opposite.

            Actually, that entire blog is a wealth of information about Rust futures.

            Actually, that blog is the reason why I asked the question in the first place.

            1. 1

              I’m getting a little out of my depth here, but my understanding is that ringbahn (which inspired the tokio implementation) is meant to be used under the hood by a futures executor, just like epoll/kqueue are used under the hood now. It’s a very thin interface layer.

              Basically, from application code you start up a TCP socket using an async library with io-uring support. Then whenever you read from it and await, the executor will do ringbahn-style buffer management and interface with io-uring.

        2. 1

          There’s also hugely popular https://github.com/libuv/libuv/pull/2322

          (Since libuv isn’t modular it hasn’t officially landed yet, but the way I understand it, both projects are at about the same level of completion)

        3. 4

          Everything about rust is big now =)

          1. 4

            Rust is the epitome of Big FOSS.

        4. 10

          This is huge! I’m gonna play with this after work. Excited to see where this ends up!