Andrew Kelley
bb1bf5b96f
std.Io: stub file writing rather than incorrect impl
2025-10-29 06:20:49 -07:00
Andrew Kelley
1e81c3a925
std.Io: rename EventLoop to IoUring
...
`std.Io.Evented` is introduced to select an appropriate Io
implementation depending on OS
2025-10-29 06:20:49 -07:00
Andrew Kelley
060fd975d9
std.Io.Group: add cancellation support to "wait"
2025-10-29 06:20:49 -07:00
Andrew Kelley
80069c1e69
std.Io.Queue: add "uncancelable" variants to "get"
...
useful for resource management
2025-10-29 06:20:49 -07:00
Andrew Kelley
d3c4158a10
std.Io: implement Select
...
and finish implementation of HostName.connect
2025-10-29 06:20:49 -07:00
Andrew Kelley
35ce907c06
std.Io.net.HostName: move lookup to the interface
...
Unfortunately this can't be implemented "above the vtable" because
various operating systems don't provide low level DNS resolution
primitives such as just putting the list of nameservers in a file.
Without libc on Linux it works great though!
Anyway this also changes the API to be based on Io.Queue. By using a
large enough buffer, reusable code can be written that does not require
concurrent, yet takes advantage of responding to DNS queries as they
come in. I sketched out a new implementation of `HostName.connect` to
demonstrate this, but it will require an additional API (`Io.Select`) to
be implemented in a future commit.
This commit also introduces "uncancelable" variants for mutex locking,
waiting on a condition, and putting items into a queue.
2025-10-29 06:20:49 -07:00
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
e8cea8accb
std.Io.Threaded: implement netListenUnix
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
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
ebcc6f166c
std.Io: bring back Timestamp but also keep Clock.Timestamp
...
this feels better
2025-10-29 06:20:49 -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
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
8771a9f082
std.Io.net: progress towards DNS resolution
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
5089352b86
std.Io: rename ThreadPool to Threaded
2025-10-29 06:20:48 -07:00
Andrew Kelley
0e9280ef1a
std.Io: extract Dir to separate file
2025-10-29 06:20:48 -07:00
Andrew Kelley
fc1e3d5bc9
Io.net: partial implementation of dns lookup
2025-10-29 06:20:48 -07:00
Andrew Kelley
e7729a7b89
std: start moving fs.File to Io
2025-10-29 06:20:48 -07:00
Andrew Kelley
bd3c65f752
std.Io.net: partially implement HostName.lookup
2025-10-29 06:20:48 -07:00
Andrew Kelley
668f905243
add some networking
2025-10-29 06:20:48 -07:00
Andrew Kelley
84d60404be
std.Io: delete asyncParallel
2025-10-29 06:20:48 -07:00
Andrew Kelley
7ead86e339
std.Io: fix error handling and asyncParallel docs
2025-10-29 06:20:48 -07:00
Andrew Kelley
f762597724
std.Io: add asyncConcurrent and asyncParallel
2025-10-29 06:20:48 -07:00
Andrew Kelley
f5d8492b1f
std.Io: rename go to asyncDetached
...
it's a better name because it's more descriptive, not a reference, and
hints that it is less common than async
2025-10-29 06:20:48 -07:00
Andrew Kelley
14c3dc4c49
revert std.Thread.Pool for now
...
and move the Io impl to a separate file
2025-10-29 06:20:48 -07:00
Andrew Kelley
e1cbcecf89
Io: update for new linked list API
2025-10-29 06:20:48 -07:00
Andrew Kelley
4b657d2de5
std.Io: remove @ptrCast workarounds
...
thanks to d53cc5e5b2ac51793ea19a847d8cee409af1dee3
2025-10-29 06:20:48 -07:00
Andrew Kelley
7aa4062f5c
introduce Io.select and implement it in thread pool
2025-10-29 06:20:48 -07:00
Jacob Young
c4fcf85c43
Io.Condition: implement full API
2025-10-29 06:20:48 -07:00
Andrew Kelley
929b616e0f
std.Io.Condition: change primitive to support only one
...
and no timer
2025-10-29 06:20:48 -07:00
Andrew Kelley
266bcfbf2f
EventLoop: implement detached async
...
data races on deinit tho
2025-10-29 06:20:48 -07:00
Jacob Young
f84aca36c3
Io: implement faster mutex
2025-10-29 06:20:48 -07:00
Andrew Kelley
a1c1d06b19
std.Io: add detached async
2025-10-29 06:20:48 -07:00
Andrew Kelley
0d4b358dd8
implement Mutex, Condition, and Queue
2025-10-29 06:20:48 -07:00
Jacob Young
08b609a79f
Io: implement sleep and fix cancel bugs
2025-10-29 06:20:48 -07:00
Jacob Young
5041c9ad9c
EventLoop: implement thread-local queues and cancellation
2025-10-29 06:20:48 -07:00