Re: [PATCH RFC v2] rust: add qdev DeviceProperties derive macro

2025-07-10 Thread Paolo Bonzini
On Thu, Jul 10, 2025 at 4:48 PM Manos Pitsidianakis wrote: > > On Thu, Jul 10, 2025 at 5:26 PM Paolo Bonzini wrote: > > > > On Thu, Jul 10, 2025 at 11:41 AM Manos Pitsidianakis > > wrote: > > > > Aside from that, I actually liked using Device for the macro name in > > > > your earlier versions.

Re: [PATCH RFC v2] rust: add qdev DeviceProperties derive macro

2025-07-10 Thread Manos Pitsidianakis
On Thu, Jul 10, 2025 at 5:26 PM Paolo Bonzini wrote: > > On Thu, Jul 10, 2025 at 11:41 AM Manos Pitsidianakis > wrote: > > > Aside from that, I actually liked using Device for the macro name in > > > your earlier versions. Yes, it's just for properties in practice, but > > > it's nice and small

Re: [PATCH RFC v2] rust: add qdev DeviceProperties derive macro

2025-07-10 Thread Paolo Bonzini
On Thu, Jul 10, 2025 at 11:41 AM Manos Pitsidianakis wrote: > > Aside from that, I actually liked using Device for the macro name in > > your earlier versions. Yes, it's just for properties in practice, but > > it's nice and small to just say Device; and it mimics Object. It's your > > choice an

Re: [PATCH RFC v2] rust: add qdev DeviceProperties derive macro

2025-07-10 Thread Manos Pitsidianakis
Thanks for the comments, I am preparing a new version with all problems/suggestions fixed. On Tue, Jul 8, 2025 at 12:48 PM Paolo Bonzini wrote: > > On 7/3/25 16:37, Manos Pitsidianakis wrote: > > Add derive macro for declaring qdev properties directly above the field > > definitions. To do this,

Re: [PATCH RFC v2] rust: add qdev DeviceProperties derive macro

2025-07-08 Thread Paolo Bonzini
On 7/3/25 16:37, Manos Pitsidianakis wrote: 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 t

[PATCH RFC v2] rust: add qdev DeviceProperties derive macro

2025-07-03 Thread Manos Pitsidianakis
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` att