qemu-cr16/rust/qemu-api-macros
Manos Pitsidianakis a71df7e143 rust: add qdev Device derive macro
Add derive macro for declaring qdev properties directly above the field
definitions. To do this, we split DeviceImpl::properties method on a
separate trait so we can implement only that part in the derive macro
expansion (we cannot partially implement the DeviceImpl trait).

Adding a `property` attribute above the field declaration will generate
a `qemu_api::bindings::Property` array member in the device's property
list.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Link: https://lore.kernel.org/r/20250711-rust-qdev-properties-v3-1-e198624416fb@linaro.org
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-09-17 19:00:56 +02:00
..
src rust: add qdev Device derive macro 2025-09-17 19:00:56 +02:00
Cargo.toml rust: centralize config in workspace root 2025-05-02 23:37:55 +02:00
meson.build rust/qemu-api-macros: add unit tests 2025-07-10 18:33:51 +02:00