mirror of
https://gitlab.com/qemu-project/qemu.git
synced 2026-08-26 22:23:12 -04:00
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>
36 lines
643 B
Meson
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
|