3 ms·
I wonder how the stdlibs of existing languages will take advantage of io_uring and async syscalls. Does this mean we won’t have to spin up a subprocess for the
by rednafi 2y ago
I wonder how the stdlibs of existing languages will take advantage of io_uring and async syscalls. Does this mean we won’t have to spin up a subprocess for the most trivial things?
- LAC-Tech 2y agoThe node.js std lib has had async versions of some of their modules for a while, eg fs/promise[1] I know node.js uses epoll but I am pretty sure bun uses io_uring. Also worth mentioning Zig has a realy great iouring library[2] right in the stdlib, which without looking up the source code I am guessing is what bun uses under the hood: [1] https://nodejs.org/api/fs.html#promises-api https://nodejs.org/api/fs.html#promises-api [2] https://ziglang.org/documentation/0.13.0/std/#std.os.linux.IoUring https://ziglang.org/documentation/0.13.0/std/#std.os.linux.I... - (give it a minute to load, the zig people are great system programmers but webdevs they are not lol)
- rednafi 2y agoWow, the Zig lib is as close to raw io_uring as it gets. It directly accepts an fd, a submission, and a result queue.
- nicoburns 2y agoNode.js has had async version of their modules from the very first version (or at least, long before it got popular). The "/promises" modules just wrap that in promises so you can use it with a nicer interface and async/await syntax (the original versions were callback based).