rustix
rustix copied to clipboard
Safe Rust bindings to POSIX-ish APIs
The crate has a really impressive list of syscalls. Since it wraps many `*at` functions, any chance that `execveat` (or `execve`) could be added to the api? Thanks!
See this discussion over in nix: https://github.com/nix-rust/nix/pull/1863#discussion_r1040109997. I believe rustix can get the same treatment and it should be backwards compatible which is awesome. I'd like to push this through,...
Currently many functions in rustix are documented with a comment that looks like this: ```rust /// `openat(dirfd, path, oflags, mode)`—Opens a file. /// /// POSIX guarantees that `openat` will use...
`SendFlags::EOT` is currently [defined](https://github.com/bytecodealliance/rustix/blob/14a88ef008f2e69e10aa31b75dc191b07b412bca/src/backend/linux_raw/net/send_recv.rs#L20) as: ``` /// `MSG_EOT` const EOT = c::MSG_EOR; ``` I.e. the flag that appears to be called `MSG_EOT` actually compiles to `MSG_EOR`. Indeed, `MSG_EOR` is the...
The ioctl `TUNSETOFFLOAD` takes an `unsigned int` as input rather than `unsigned int*`, so currently none of the standard `Ioctl` type work and must be worked-around via an awkward int-to-pointer...
`proc_self_status` again... It fails when called multiple times concurrently. On versions `0.18.14` and less it works fine, so I suppose this is not expected behaviour. If it *is*, then that...
This is a breaking API change. This is needed for something like `SPI_IOC_MESSAGE(N)`, which takes an array of `N` `spi_ioc_transfer` structs. Which nix this ioctl would use `ioctl_write_buf!`. I'm not...
This removes the need for dynamically allocating a Vec when the kevent() function is called. The documentation is also rephrased slightly as slices don't really have a "capacity", but only...
The wrapper for [`kevent()`](https://docs.rs/rustix/latest/x86_64-unknown-freebsd/rustix/event/kqueue/fn.kevent.html) is defined as follows: ```rust pub unsafe fn kevent( kqueue: impl AsFd, changelist: &[Event], eventlist: &mut Vec, timeout: Option, ) -> io::Result ``` Here the `eventlist`...
Add sendmsg ancillary IPV6_PKTINFO option which allows user to specify outgoing source IP address and interface index. This complements the sendmsg_v6 where the destination IP address can also be set.