qemu/rust/qemu-api
Paolo Bonzini bb42965dd4 rust: do not use MaybeUninit::zeroed()
MaybeUninit::zeroed() is handy but is not available as a "const" function
until Rust 1.75.0.

Remove the default implementation of Zeroable::ZERO, and write by hand
the definitions for those types that need it.  It may be possible to
add automatic implementation of the trait, via a procedural macro and/or
a trick similar to offset_of!, but do it the easy way for now.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-11-05 14:18:17 +01:00
..
src rust: do not use MaybeUninit::zeroed() 2024-11-05 14:18:17 +01:00
tests rust: introduce alternative implementation of offset_of! 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: introduce alternative implementation of offset_of! 2024-11-05 14:18:16 +01:00
Cargo.toml rust: introduce alternative implementation of offset_of! 2024-11-05 14:18:16 +01:00
meson.build rust: introduce alternative implementation of offset_of! 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