qemu-cr16/rust/qemu-api
Paolo Bonzini dcdee1e718 rust: vmstate: use const_refs_to_static
The VMStateDescriptionBuilder already needs const_refs_static, so
use it to remove the need for vmstate_clock! and vmstate_struct!,
as well as to simplify the implementation for scalars.

If the consts in the VMState trait can reference to static
VMStateDescription, scalars do not need the info_enum_to_ref!
indirection and structs can implement the VMState trait themselves.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250908105005.2119297-9-pbonzini@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-09-17 19:00:56 +02:00
..
src rust: vmstate: use const_refs_to_static 2025-09-17 19:00:56 +02:00
tests rust: vmstate: use const_refs_to_static 2025-09-17 19:00:56 +02:00
.gitignore rust: allow using build-root bindings.rs from cargo 2024-12-10 18:44:06 +01:00
build.rs rust/qemu-api: Fix binding path in source directory 2025-07-10 18:33:51 +02:00
Cargo.toml rust: move dependencies to rust/Cargo.toml 2025-08-27 10:57:04 +02:00
meson.build rust/qemu-api: Add initial logging support based on C API 2025-06-20 13:25:59 +02:00
README.md rust: build: add "make clippy", "make rustfmt", "make rustdoc" 2024-12-10 18:44:06 +01:00
wrapper.h rust/qemu-api: Add initial logging support based on C API 2025-06-20 13:25:59 +02:00

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