On Wed, Aug 28, 2024 at 6:12 AM Manos Pitsidianakis <manos.pitsidiana...@linaro.org> wrote: > > Add rust/qemu-api, which exposes rust-bindgen generated FFI bindings and > provides some declaration macros for symbols visible to the rest of > QEMU.
The only comment I have is that I would drop the allocator support completely. It adds complications and, at least initially, we can plan/hope that all cross-language allocations go through a constructor function like error_setg() or object_new(). In the case of QOM, if we wanted to allocate objects in a Box rather than malloc-ed memory, we could also put in the object a free function that calls mem::drop(Box::from_raw(p)) Fixing rust.bindgen() to use the right CLANG_PATH/LIBCLANG_PATH should probably be done in meson itself. The (not too hard) alternative is to just use a custom_target. Paolo