1. 31

Please note that I am not personally building a new runtime, that’s just the title of the article.

  1. 4

    If smol doesn’t depend on mio, then how does it do the actual non-blocking I/O? Do we still have to use async-std and/or tokio for that part?

    1. 1

      It wraps the stdlib’s TcpStream and friends with epoll (on Linux) and other platform specific APIs to determine when to wake up waiting tasks.

      1. 1

        Isn’t that what mio does? Was mio’s API just not the right API for what you needed?

        1. 3

          So, I’m not the creator, but stjepang was nice enough to let me take a look early.

          It does look like mio uses epoll under the hood (though it’s abstracted a ton), however there’s a lot of code there. As far as I can tell, a major reason for wanting to write this async runtime was to show how simple a full feature-complete runtime can be. The entire implementation of smol (including documentation and newlines, excluding external dependencies) is under 2000 lines. mio itself is over 7500.

          1. 1

            Looking forward to trying it out!

    2. 4

      That is a bit frustrating: I want to read more now!