qemu/rust/meson.build
Paolo Bonzini 4c5c26548b rust: use meson automatic parsing of Cargo.toml
Finally, automatic parsing of Cargo.toml is also possible for QEMU's own
crates, not just for subprojects.  This removes the need to list the
dependencies and language editions in both Cargo.toml and meson.build
files.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-08-20 09:24:57 +02:00

36 lines
643 B
Meson

if not have_system
subdir_done()
else
message('Rust enabled but it is only used by system emulators.')
endif
cargo_ws = import('rust').workspace()
genrs = []
subdir('qemu-macros')
subdir('common')
subdir('bindings')
subdir('bits')
subdir('util')
subdir('bql')
subdir('migration')
subdir('qom')
subdir('chardev')
subdir('hw/core')
subdir('system')
subdir('tests')
subdir('trace')
subdir('hw')
cargo = find_program('cargo', required: false)
if cargo.found()
run_target('rustfmt',
command: [config_host['MESON'], 'devenv',
'--workdir', '@CURRENT_SOURCE_DIR@',
cargo, 'fmt'],
depends: genrs)
endif