29 Commits

Author SHA1 Message Date
Andrew Kelley
2bcdde2985 compiler: update for introduction of std.Io
only thing remaining is using libc dns resolution when linking libc
2025-10-29 06:20:49 -07:00
Andrew Kelley
0732ff2263 std.Io.Threaded: implement connecting to unix sockets 2025-10-29 06:20:49 -07:00
Andrew Kelley
e8cea8accb std.Io.Threaded: implement netListenUnix 2025-10-29 06:20:49 -07:00
Andrew Kelley
d680b9e9b2 std.Io.File: add WouldBlock to the error set
Even in an asynchronous world, the concept of a non-blocking flag is
useful because it determines under what conditions the operation
completes.
2025-10-29 06:20:49 -07:00
Andrew Kelley
e0e463bcf7 std.Io.net.Stream.Reader: fix not using buffer 2025-10-29 06:20:49 -07:00
Andrew Kelley
be1ae430a1 std.Io.Threaded.netReadPosix: support cancelation 2025-10-29 06:20:49 -07:00
Andrew Kelley
71ff6e0ef7 std: fix seekBy unit test 2025-10-29 06:20:49 -07:00
Andrew Kelley
3b34622368 std.Io: add unix domain sockets API
note that "reuseaddr" does nothing for these
2025-10-29 06:20:49 -07:00
Andrew Kelley
b1733b7bce std.Io: implement dirOpenFile 2025-10-29 06:20:49 -07:00
Andrew Kelley
8a1e6c8c39 std.Io: implement dirStatPath 2025-10-29 06:20:49 -07:00
Andrew Kelley
eadfefa002 std.Io: implement dirMake
In the future, it might be nice to introduce a type for file system path
names. This would be a way to avoid having InvalidFileName in the error
set, since construction of such type could validate it above the
interface.
2025-10-29 06:20:49 -07:00
Andrew Kelley
ebcc6f166c std.Io: bring back Timestamp but also keep Clock.Timestamp
this feels better
2025-10-29 06:20:49 -07:00
Andrew Kelley
89412fda77 std.Io: implement fileStat 2025-10-29 06:20:48 -07:00
Andrew Kelley
47aa5a70a5 std: updating to std.Io interface
got the build runner compiling
2025-10-29 06:20:48 -07:00
Andrew Kelley
066864a0bf std.zig.system: upgrade to std.Io.Reader 2025-10-29 06:20:48 -07:00
Andrew Kelley
b428612a20 WIP: hack away at std.Io return flight 2025-10-29 06:20:48 -07:00
Andrew Kelley
774df26835 WIP: hack at std.Io on a plane 2025-10-29 06:20:48 -07:00
Andrew Kelley
62d0dd0d36 std.Io.Threaded.netReceive: recvmsg first, then poll
Calling recvmsg first means no poll syscall needed when messages are
already in the operating system queue. Empirically, this happens when
repeating a DNS query that has been already been made recently. In such
case, poll() is never called!
2025-10-29 06:20:48 -07:00
Andrew Kelley
a6347a68a9 std.Io.net: implement receiving connectionless messages 2025-10-29 06:20:48 -07:00
Andrew Kelley
95dee2af9c std.Io: implement netSend 2025-10-29 06:20:48 -07:00
Andrew Kelley
cde5a51d0c std.Io.net: make netSend support multiple messages
this lowers to sendmmsg on linux, and means Io.Group is no longer
needed, resulting in a more efficient implementation.
2025-10-29 06:20:48 -07:00
Andrew Kelley
b22400271f std.Io.net.HostName: finish implementing DNS lookup 2025-10-29 06:20:48 -07:00
Andrew Kelley
2e1ab5d3f7 std.Io.Threaded: implement Group.cancel 2025-10-29 06:20:48 -07:00
Andrew Kelley
8e1da66ba1 std.Io: implement Group API 2025-10-29 06:20:48 -07:00
Andrew Kelley
f9d976a4e1 std.Io: rename asyncConcurrent to concurrent 2025-10-29 06:20:48 -07:00
Andrew Kelley
60c4bdb14c Io.net: implement more networking
the next task is now implementing Io.Group
2025-10-29 06:20:48 -07:00
Andrew Kelley
e7c9df9fb0 Io.net: use resolve for IPv6
/etc/resolv.conf might have IPv6 addresses with scope in it, so this is
needed.
2025-10-29 06:20:48 -07:00
Andrew Kelley
d776a6bbbe Io.net: rework IPv6 parsing and printing
extract pure functional logic into pure functions and then layer the
scope crap on top properly

the formatting code incorrectly didn't do the reverse operation
(if_indextoname). fix that with some TODO panics
2025-10-29 06:20:48 -07:00
Andrew Kelley
5089352b86 std.Io: rename ThreadPool to Threaded 2025-10-29 06:20:48 -07:00