Open eignnx opened 9 months ago
I actually don't think passing around file handles or file descriptors is the best idea. Rust really doesn't like working with raw file descriptors or converting to them from ints.
I think a simpler design for now is to allow output redirection via a built-in like this:
[goal][stream][redirection_path]
would run Goal
but first redirect Stream
(either stdout
or sterr
) to a new file located atRedirectionPath
.
[fname][open_fd][mode]
which opens the file with modeMode
and unifiesOpenFd
with the file descriptor.[io_write][stream]
to write to integer file descriptors bound toStream
.