qemu/rust/qemu-api
Paolo Bonzini bfe0f6b02a subprojects: add the foreign crate
This is a cleaned up and separated version of the patches at
https://lore.kernel.org/all/20240701145853.1394967-4-pbonzini@redhat.com/
https://lore.kernel.org/all/20240701145853.1394967-5-pbonzini@redhat.com/

Its first user will be the Error bindings; for example a QEMU Error ** can be
converted to a Rust Option using

     unsafe { Option::<Error>::from_foreign(c_error) }

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-06-05 20:24:51 +02:00
..
src rust: cell: remove support for running doctests with "cargo test --doc" 2025-06-03 22:42:18 +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: clippy: enable uninlined_format_args lint 2025-05-06 16:02:04 +02:00
Cargo.toml rust: remove offset_of replacement 2025-05-06 16:02:04 +02:00
meson.build subprojects: add the foreign crate 2025-06-05 20:24:51 +02:00
README.md rust: build: add "make clippy", "make rustfmt", "make rustdoc" 2024-12-10 18:44:06 +01: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