mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00
![]() Unfortunately, at present it's not possible to have a const "with_exist_check" method to append test_fn after vmstate_struct (due to error on "constant functions cannot evaluate destructors" for `F`). Before the vmstate builder, the only way to support "test_fn" is to extend vmstate_struct macro to add the such new optional member (and fortunately, Rust can still parse the current expansion!). Abstract the previous callback implementation of vmstate_validate into a separate macro, and moves it before vmstate_struct for vmstate_struct to call. Note that there's no need to add any extra flag for a new test_fn added in the VMStateField. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250414144943.1112885-2-zhao1.liu@intel.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
---|---|---|
.. | ||
src | ||
tests | ||
.gitignore | ||
build.rs | ||
Cargo.toml | ||
meson.build | ||
README.md |
QEMU bindings and API wrappers
This library exports helper Rust types, Rust macros and C FFI bindings for internal QEMU APIs.
The C bindings can be generated with bindgen
, using this build target:
$ make bindings.inc.rs
Generate Rust documentation
Common Cargo tasks can be performed from the QEMU build directory
$ make clippy
$ make rustfmt
$ make rustdoc