As part of my "investigation" [0] into safer object initialization using
pinned-init, I found out that pinned-init will probably not work with tuple
structs for some time [1]. So I figured out how to change QEMU's Wrapper derive
macro so that both tuple structs and classic structs (still `#[repr(transparent)]`
and having only one member) are supported.
The second patch is there just to show that it works, I also checked the result
with `cargo expand` to make sure.
This is just to see if the patch makes sense the way it is. I'm still trying to
see the best way forward with this pinning effort. Many thanks for Paolo's
patience with me. I'm using what I learn to also try and make a proof of
concept of something similar to the RustInQEMU effort (although way smaller in
scope) in libvirt, so it takes a bit more time.
[0] read: learning QEMU internals and possible Rust usage
[1] https://github.com/Rust-for-Linux/pin-init/issues/85
Martin Kletzander (2):
rust: Make common::Wrapper work with non-tuple structs as well
rust/util: Change Timer and TimerListGroup to normal structs
rust/qemu-macros/src/lib.rs | 49 ++++++++++++++++++++++++++++---------
rust/util/src/timer.rs | 10 +++++---
2 files changed, 44 insertions(+), 15 deletions(-)
--
2.51.0