On Tue, Feb 18, 2025 at 07:20:12PM +0100, Kevin Wolf wrote:
> This adds helper functions that allow running Rust futures to completion
> using QEMU's event loops.
This commit is a cliff-hanger. I'm intrigued to find out how timer, fd,
etc event loop integration will work :).
>
> Signed-off-by: K
Am 20.02.2025 um 07:35 hat Zhao Liu geschrieben:
> > +/// Use QEMU's event loops to run a Rust [`Future`] to completion and
> > return its result.
> > +///
> > +/// This function must be called in coroutine context. If the future isn't
> > ready yet, it yields.
> > +pub fn qemu_co_run_future(futu
> +/// Use QEMU's event loops to run a Rust [`Future`] to completion and return
> its result.
> +///
> +/// This function must be called in coroutine context. If the future isn't
> ready yet, it yields.
> +pub fn qemu_co_run_future(future: F) -> F::Output {
> +let waker = Waker::from(Arc::new
This adds helper functions that allow running Rust futures to completion
using QEMU's event loops.
Signed-off-by: Kevin Wolf
---
include/qemu/coroutine-rust.h | 24 +++
rust/wrapper.h| 1 +
util/qemu-co-rust-async.c | 55 +
rust/qemu-api/meson