qemu/rust/qemu-api
Paolo Bonzini 1ae4ca0463 rust: move rust.bindgen to qemu-api crate
Once qemu-api is split in multiple crates, each of them will have
its own invocation of bindgen.  There cannot be only one, because
there are occasional "impl" blocks for the bindgen-generated
structs (e.g. VMStateFlags or QOM classes) that have to
reside in the same crate as the bindgen-generated code.

For now, prepare for this new organization by invoking bindgen
within the qemu-api crate's build definitions; it's also a
much better place to list enums that need specific treatment
from bindgen.

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-06-20 13:24:42 +02:00
..
src rust: qom: change instance_init to take a ParentInit<> 2025-06-17 09:54:52 +02:00
tests rust: Fix Zhao's email address 2025-05-26 18:04:27 +02:00
.gitignore rust: allow using build-root bindings.rs from cargo 2024-12-10 18:44:06 +01:00
build.rs rust: move rust.bindgen to qemu-api crate 2025-06-20 13:24:42 +02:00
Cargo.toml rust: qemu-api: add bindings to Error 2025-06-05 20:24:51 +02:00
meson.build rust: move rust.bindgen to qemu-api crate 2025-06-20 13:24:42 +02:00
README.md rust: build: add "make clippy", "make rustfmt", "make rustdoc" 2024-12-10 18:44:06 +01:00
wrapper.h rust: move rust.bindgen to qemu-api crate 2025-06-20 13:24:42 +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