News for hackers. Stuff that matters.
Re:Rust in QEMU Roadmap by bonzini on Tuesday December 03, 2024 @11:51AM (#42308259)
> As far as I know, const traits are still on track.

Yes they are. My use case is something like the bitflags crate, there are lots of bit flags in emulated devices of course. In the meanwhile I guess it would be possible to use macros to turn something like "bit_const!(Type:A|B)" to "Type(A.0|B.0)" or something like that.

> As in, turning a Rust closure into a C function-pointer-plus-context-parameter?

Yes, more in general everything related to callbacks is doable but very verbose. We might do (procedural?) macro magic later on to avoid the verbosity but for now I prefer to stick to pure Rust until there's an idea of which patterns recur.

Let me know by email about any occasions to present what I have.

Re:Rust in QEMU Roadmap by 0x457 on Tuesday December 03, 2024 @12:34PM (#42308764)
I made this handy function to pass callbacks to C: https://github.com/andoriyu/uclicious/blob/master/src/traits...