Closed straight-shoota closed 1 month ago
The methods in the wasi interface are new, should they be tested?
@beta-ziliani Not sure what you mean which methods would need to be tested on Wasi? This isn't really adding any new behaviour, it's just shifting implementations from one class to another.
I guess I'm missing the part in which WASI uses unix/file_descriptor.cr. But in this case, doesn't it make sense to abstract these two instead of copying it?
WASI event loop and libevent are completely different things.
I suppose we could drop the evented wrapper from the WASI implementation, because it does not support non-blocking operations anyway. I left it in for now because evented_read
etc. also do error handling. This will be another refactor after this and #14643 are merged.
Extracts the system interface for
FileDescriptor
operations on the event loop to aEventLoop
module.This implements part of https://github.com/crystal-lang/rfcs/pull/7
Related: #14643 does the same for
Socket