qemu-cr16/rust
Zhao Liu 9686aa9a05 rust/qdev: Support bit property in #property macro
Add BIT_INFO to QDevProp trait, so that bit related property info could
be bound to u32 & u64.

Then add "bit=*" field in #property attributes macro to allow device to
configure bit property.

In addtion, convert the #property field parsing from `if-else` pattern
to `match` pattern, to help readability. And note, the `bitnr` member of
`Property` struct is generated by manual TokenStream construction,
instead of conditional repetition (like #(bitnr: #bitnr,)?) since
`quote` doesn't support this.

In addtion, rename VALUE member of QDevProp trait to BASE_INFO.

And update the test cases about qdev property.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20250920160520.3699591-9-zhao1.liu@intel.com
2025-09-22 17:17:19 +02:00
..
bindings/src rust: split "hwcore" crate 2025-09-17 19:00:57 +02:00
bits rust: re-export qemu_macros internal helper in "bits" 2025-09-17 19:00:57 +02:00
bql rust: build: remove "protocol: rust: from doctests 2025-09-22 17:17:18 +02:00
chardev rust: re-export qemu macros from common/qom/hwcore 2025-09-17 19:00:58 +02:00
common rust/common/uninit: Fix Clippy's complaints about lifetime 2025-09-22 17:17:18 +02:00
hw rust/qdev: Support bit property in #property macro 2025-09-22 17:17:19 +02:00
migration rust: build: remove "protocol: rust: from doctests 2025-09-22 17:17:18 +02:00
qemu-macros rust/qdev: Support bit property in #property macro 2025-09-22 17:17:19 +02:00
qom rust: build: remove "protocol: rust: from doctests 2025-09-22 17:17:18 +02:00
system rust: do not inline do_init_io 2025-09-17 19:00:58 +02:00
tests rust: re-export qemu macros from common/qom/hwcore 2025-09-17 19:00:58 +02:00
util rust: build: remove "protocol: rust: from doctests 2025-09-22 17:17:18 +02:00
.gitignore
Cargo.lock rust: qemu-macros: switch #[property] parsing to use combinators 2025-09-22 17:17:18 +02:00
Cargo.toml rust: repurpose qemu_api -> tests 2025-09-17 19:00:57 +02:00
Kconfig rust: add PL011 device model 2024-11-05 14:18:15 +01:00
meson.build subprojects: add attrs crate 2025-09-22 17:17:18 +02:00
rustfmt.toml rust: add crate to expose bindings and interfaces 2024-10-11 12:32:17 +02:00