rust: add bindings for timer
authorZhao Liu <zhao1.liu@intel.com>
Mon, 10 Feb 2025 03:00:47 +0000 (11:00 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 13 Feb 2025 11:51:34 +0000 (12:51 +0100)
commiteadb83f9a3722045e291b6a73994004007dc4657
treea4ee1dd4d1167655bb16b2c879049f0ac6ffe696
parentd015d4cbb4d16cf8adc8c10cbd2d0a45f014dad1
rust: add bindings for timer

Add timer bindings to help handle idiomatic Rust callbacks.

Additionally, wrap QEMUClockType in ClockType binding to avoid unsafe
calls in device code.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250210030051.2562726-7-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
docs/devel/rust.rst
meson.build
rust/qemu-api/meson.build
rust/qemu-api/src/lib.rs
rust/qemu-api/src/timer.rs [new file with mode: 0644]
rust/wrapper.h