mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00

This commit adds a re-implementation of hw/char/pl011.c in Rust. How to build: 1. Configure a QEMU build with: --enable-system --target-list=aarch64-softmmu --enable-rust 2. Launching a VM with qemu-system-aarch64 should use the Rust version of the pl011 device Co-authored-by: Junjie Mao <junjie.mao@intel.com> Co-authored-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Junjie Mao <junjie.mao@intel.com> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Link: https://lore.kernel.org/r/20241024-rust-round-2-v1-2-051e7a25b978@linaro.org
26 lines
761 B
Meson
26 lines
761 B
Meson
subproject('bilge-0.2-rs', required: true)
|
|
subproject('bilge-impl-0.2-rs', required: true)
|
|
|
|
bilge_dep = dependency('bilge-0.2-rs')
|
|
bilge_impl_dep = dependency('bilge-impl-0.2-rs')
|
|
|
|
_libpl011_rs = static_library(
|
|
'pl011',
|
|
files('src/lib.rs'),
|
|
override_options: ['rust_std=2021', 'build.rust_std=2021'],
|
|
rust_abi: 'rust',
|
|
dependencies: [
|
|
bilge_dep,
|
|
bilge_impl_dep,
|
|
qemu_api,
|
|
qemu_api_macros,
|
|
],
|
|
)
|
|
|
|
rust_devices_ss.add(when: 'CONFIG_X_PL011_RUST', if_true: [declare_dependency(
|
|
link_whole: [_libpl011_rs],
|
|
# Putting proc macro crates in `dependencies` is necessary for Meson to find
|
|
# them when compiling the root per-target static rust lib.
|
|
dependencies: [bilge_impl_dep, qemu_api_macros],
|
|
variables: {'crate': 'pl011'},
|
|
)])
|