diff --git a/meson.build b/meson.build
index 1239f5c48c..8cea09ffe1 100644
--- a/meson.build
+++ b/meson.build
@@ -4,6 +4,7 @@ project('qemu', ['c'], meson_version: '>=1.5.0',
version: files('VERSION'))
meson.add_devenv({ 'MESON_BUILD_ROOT' : meson.project_build_root() })
+meson.add_devenv({ 'CARGO_TARGET_DIR' : meson.project_build_root() / 'cargo' })
add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default:
true)
add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=1',
'SPEED=slow'])
@@ -4083,7 +4084,7 @@ if have_rust
bindings_rs = rust.bindgen(
input: 'rust/wrapper.h',
dependencies: common_ss.all_dependencies(),
- output: 'bindings.rs.inc',
+ output: 'bindings.inc.rs',