qemu/rust/qemu-api
Paolo Bonzini cb7ada5409 rust: allow using build-root bindings.rs from cargo
Right now, using cargo with QEMU requires copying by hand the bindings.rs to the
source tree.  Instead, we can use an include file to escape the cage of cargo's
mandated source directory structure.

By running cargo within meson's "devenv" and adding a MESON_BUILD_ROOT
environment variable, it is easy for build.rs to find the file.  However, the
file must be symlinked into cargo's output directory for rust-analyzer to find
it.

Suggested-by: Junjie Mao <junjie.mao@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-12-10 18:44:06 +01:00
..
src rust: allow using build-root bindings.rs from cargo 2024-12-10 18:44:06 +01:00
tests rust: do not use --generate-cstr 2024-11-05 14:18:17 +01:00
.gitignore rust: allow using build-root bindings.rs from cargo 2024-12-10 18:44:06 +01:00
build.rs rust: allow using build-root bindings.rs from cargo 2024-12-10 18:44:06 +01:00
Cargo.toml rust: introduce alternative implementation of offset_of! 2024-11-05 14:18:16 +01:00
meson.build rust: allow using build-root bindings.rs from cargo 2024-12-10 18:44:06 +01:00
README.md rust: allow using build-root bindings.rs from cargo 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:

$ ninja bindings.inc.rs

Generate Rust documentation

To generate docs for this crate, including private items:

pyvenv/bin/meson devenv -w ../rust cargo doc --no-deps --document-private-items