qemu/rust/qemu-api
Manos Pitsidianakis 0a65e4124a rust: add definitions for vmstate
Add a new qemu_api module, `vmstate`. Declare a bunch of Rust
macros declared that are equivalent in spirit to the C macros in
include/migration/vmstate.h.

For example the Rust of equivalent of the C macro:

  VMSTATE_UINT32(field_name, struct_name)

is:

  vmstate_uint32!(field_name, StructName)

This breathtaking development will allow us to reach feature parity between
the Rust and C pl011 implementations.

Extracted from a patch by Manos Pitsidianakis
(https://lore.kernel.org/qemu-devel/20241024-rust-round-2-v1-4-051e7a25b978@linaro.org/).

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-11-05 14:18:16 +01:00
..
src rust: add definitions for vmstate 2024-11-05 14:18:16 +01:00
tests rust: add definitions for vmstate 2024-11-05 14:18:16 +01:00
.gitignore rust: add crate to expose bindings and interfaces 2024-10-11 12:32:17 +02:00
build.rs rust: add crate to expose bindings and interfaces 2024-10-11 12:32:17 +02:00
Cargo.lock rust: add crate to expose bindings and interfaces 2024-10-11 12:32:17 +02:00
Cargo.toml rust: add crate to expose bindings and interfaces 2024-10-11 12:32:17 +02:00
meson.build rust: add definitions for vmstate 2024-11-05 14:18:16 +01:00
README.md rust: add crate to expose bindings and interfaces 2024-10-11 12:32:17 +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:

$ ninja bindings.rs

Generate Rust documentation

To generate docs for this crate, including private items:

cargo doc --no-deps --document-private-items