Re: [PATCH 15/23] rust: introduce alternative implementation of offset_of!

2024-11-04 Thread Junjie Mao
Paolo Bonzini writes: > On 11/3/24 10:54, Junjie Mao wrote: >> Paolo Bonzini writes: >> >>> diff --git a/rust/qemu-api-macros/src/lib.rs >>> b/rust/qemu-api-macros/src/lib.rs >>> index a4bc5d01ee8..c2ea22101e4 100644 >>> --- a/rust/qemu-api-macros/src/lib.rs >>> +++ b/rust/qemu-api-macros/src

Re: [PATCH 15/23] rust: introduce alternative implementation of offset_of!

2024-11-04 Thread Paolo Bonzini
On 11/3/24 10:54, Junjie Mao wrote: Paolo Bonzini writes: From: Junjie Mao offset_of! was stabilized in Rust 1.77.0. Use an alternative implemenation that was found on the Rust forums, and whose author agreed to license as MIT for use in QEMU. The alternative allows only one level of fiel

Re: [PATCH 15/23] rust: introduce alternative implementation of offset_of!

2024-11-04 Thread Paolo Bonzini
On 11/3/24 10:54, Junjie Mao wrote: Paolo Bonzini writes: From: Junjie Mao offset_of! was stabilized in Rust 1.77.0. Use an alternative implemenation that was found on the Rust forums, and whose author agreed to license as MIT for use in QEMU. The alternative allows only one level of fiel

Re: [PATCH 15/23] rust: introduce alternative implementation of offset_of!

2024-11-04 Thread Paolo Bonzini
On 11/3/24 10:54, Junjie Mao wrote: Paolo Bonzini writes: From: Junjie Mao offset_of! was stabilized in Rust 1.77.0. Use an alternative implemenation that was found on the Rust forums, and whose author agreed to license as MIT for use in QEMU. The alternative allows only one level of fiel

Re: [PATCH 15/23] rust: introduce alternative implementation of offset_of!

2024-11-03 Thread Junjie Mao
Paolo Bonzini writes: > From: Junjie Mao > > offset_of! was stabilized in Rust 1.77.0. Use an alternative implemenation > that was found on the Rust forums, and whose author agreed to license as > MIT for use in QEMU. > > The alternative allows only one level of field access, but apart > from

[PATCH 15/23] rust: introduce alternative implementation of offset_of!

2024-10-25 Thread Paolo Bonzini
From: Junjie Mao offset_of! was stabilized in Rust 1.77.0. Use an alternative implemenation that was found on the Rust forums, and whose author agreed to license as MIT for use in QEMU. The alternative allows only one level of field access, but apart from this can be used just by replacing core