From 1ae4ca0463d737ead1162c35b267ef5882d42883 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 13 Jun 2025 14:49:27 +0200 Subject: 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 Signed-off-by: Paolo Bonzini --- rust/qemu-api/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rust/qemu-api/build.rs') diff --git a/rust/qemu-api/build.rs b/rust/qemu-api/build.rs index 1e720641d2..7849486c1b 100644 --- a/rust/qemu-api/build.rs +++ b/rust/qemu-api/build.rs @@ -14,7 +14,7 @@ fn main() -> Result<()> { let path = env::var("MESON_BUILD_ROOT") .unwrap_or_else(|_| format!("{}/src", env!("CARGO_MANIFEST_DIR"))); - let file = format!("{path}/bindings.inc.rs"); + let file = format!("{path}/rust/qemu-api/bindings.inc.rs"); let file = Path::new(&file); if !Path::new(&file).exists() { panic!(concat!( -- cgit 1.4.1