- Added Android support by using the appropriate macro configuration when exporting functionality.
- Derive
Debug
forFamStructWrapper
&EventFd
.
- The
ioctl_expr
is now a const function instead of a macro.
- Fixed safety for sock_ctrl_msg::raw_recvmsg() and enhanced documentation
- Fixed sock_cmsg: ensured copy_nonoverlapping safety
- [#135]: sock_ctrl_msg: mark recv_with_fds as unsafe
- Added set_check_for_hangup() to PollContext.
- Added writable()/has_error()/raw_events() to PollEvent.
- Derived Copy/Clone for PollWatchingEvents.
- Fixed the implementation of
write_zeroes
to useFALLOC_FL_ZERO_RANGE
instead ofFALLOC_FL_PUNCH_HOLE
. - Added
write_all_zeroes
toWriteZeroes
, which callswrite_zeroes
in a loop until the requested length is met. - Added a new trait,
WriteZeroesAt
, which allows giving the offset in file instead of using the current cursor. - Removed
max_events
fromEpoll::wait
which removes possible undefined behavior. - [#104]: Fixed FAM
struct
PartialEq
implementation. - [#85]: Fixed FAM struct
Clone
implementation. - [#99]: Validate the maximum capacity when initializing FAM Struct.
- Switched to Rust edition 2018.
- Added the
metric
module that provides aMetric
interface as well as a default implementation forAtomicU64
.
- Implemented
From<io::Error>
forerrno::Error
.
- Derived Copy for EpollEvent.
- Implemented Debug for EpollEvent.
- Changed
Epoll::ctl
signature such thatEpollEvent
is passed by value and not by reference. - Enabled this crate to be used on other Unixes (besides Linux) by using target_os = linux where appropriate.
- Added conditionally compiled
serde
compatibility toFamStructWrapper
, gated by thewith-serde
feature. - Implemented
Into<std::io::Error
forerrno::Error
. - Added a wrapper over
libc::epoll
used for basic epoll operations.
- Added Windows support for TempFile and errno::Error.
- Added
into_file
for TempFile which enables the TempFile to be used as a regular file. - Implemented std::error::Error for errno::Error.
- Fixed the implementation of
register_signal_handler
by allowing only valid signal numbers.
- Advertise functionality for obtaining POSIX real time signal base which is needed to provide absolute signals in the API changed in v0.3.0.
- Removed
for_vcpu
argument fromsignal::register_signal_handler
andsignal::validate_signal_num
. Users can now pass absolute values for all valid signal numbers. - Removed
flag
argument ofsignal::register_signal_handler
public methods, which now defaults tolibc::SA_SIGINFO
. - Changed
TempFile::new
andTempDir::new
to create new temporary files/ directories inside$TMPDIR
if set, otherwise inside/tmp
. - Added methods which create temporary files/directories with prefix.
- Fixed the FamStructWrapper Clone implementation to avoid UB.
- fam: updated the macro that generates implementions of FamStruct to also take a parameter that specifies the name of the flexible array member.
- Fixed the Cargo.toml license.
- Fixed some clippy warnings.
This is the first vmm-sys-util crate release.
It is a collection of modules implementing helpers and utilities used by multiple rust-vmm components and rust-vmm based VMMs. Most of the code in this first release is based on either the crosvm or the Firecracker projects, or both.
The first release comes with the following Rust modules:
-
aio: Safe wrapper over
Linux AIO
. -
errno: Structures, helpers, and type definitions for working with
errno
. -
eventfd: Structure and wrapper functions for working with
eventfd
. -
fallocate: Enum and function for dealing with an allocated disk space by
fallocate
. -
fam: Trait and wrapper for working with C defined FAM structures.
-
file_traits: Traits for handling file synchronization and length.
-
ioctls: Macros and functions for working with
ioctl
. -
poll: Traits and structures for working with
epoll
-
rand: Miscellaneous functions related to getting (pseudo) random numbers and strings.
-
seek_hole: Traits and implementations over
lseek64
. -
signal: Enums, traits and functions for working with
signal
. -
sockctrl_msg: Wrapper for sending and receiving messages with file descriptors on sockets that accept control messages (e.g. Unix domain sockets).
-
tempdir: Structure for handling temporary directories.
-
tempfile: Struct for handling temporary files as well as any cleanup required.
-
terminal: Trait for working with
termios
. -
timerfd: Structure and functions for working with
timerfd
. -
write_zeroes: Traits for replacing a range with a hole and writing zeroes in a file.