RustInQemu: Difference between revisions

From QEMU
m (Manos moved page Features/Rust to RustInQemu over redirect: Rust is not a QEMU feature just like Python or C isn't)
Line 12: Line 12:
* <code>[RFC v3 00/32] Rust binding for QAPI and qemu-ga QMP handler examples</code><br />[https://patchew.org/QEMU/20210907121943.3498701-1-marcandre.lureau@redhat.com/ on patchew] [https://lore.kernel.org/qemu-devel/20210907121943.3498701-1-marcandre.lureau@redhat.com/ on lore]
* <code>[RFC v3 00/32] Rust binding for QAPI and qemu-ga QMP handler examples</code><br />[https://patchew.org/QEMU/20210907121943.3498701-1-marcandre.lureau@redhat.com/ on patchew] [https://lore.kernel.org/qemu-devel/20210907121943.3498701-1-marcandre.lureau@redhat.com/ on lore]


== Places to start from for idiomatic bindings ==
== Minimum supported version ==
* 1.56.0: 2021 edition
* 1.59.0: <tt>CStr::from_bytes_with_nul_unchecked</tt> (needed by cstr crate, see below)
* 1.64.0: <tt>std::ffi::c_char</tt>
* 1.77.0: C string literals, offset_of!
**alternative: cstr crate, [https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=10a22a9b8393abd7b541d8fc844bc0df with_offsets macro]


== TODO ==
Before commit:
* [https://lore.kernel.org/qemu-devel/1c53f8d2-3b33-404c-bb1c-38475087d7ae@redhat.com/ single cargo build]
After commit:
* lower minimum supported version (Debian needs 1.63.0)
* Error: [[Features/Rust/Error]]
* Error: [[Features/Rust/Error]]
* QOM: Paolo has started some experiments, [[Features/Rust/QOM]]
* QOM: Paolo has started some experiments, [[Features/Rust/QOM]]

Revision as of 08:29, 26 June 2024

For the old RustInQemu page, see RustInQemu/2022

Active efforts in 2024

  • Subject: [RFC 0/6] scripts: Rewrite simpletrace printer in Rust
    Date: Mon, 27 May 2024 16:14:15 +0800
    RFC v1
  • ARM PL011 UART device model in Rust
    Subject: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust
    Date: Mon, 10 Jun 2024 21:22:35 +0300
    RFC v1 v2
    • Meson integration
    • Bindings generation

Past efforts

  • [RFC v3 00/32] Rust binding for QAPI and qemu-ga QMP handler examples
    on patchew on lore

Minimum supported version

  • 1.56.0: 2021 edition
  • 1.59.0: CStr::from_bytes_with_nul_unchecked (needed by cstr crate, see below)
  • 1.64.0: std::ffi::c_char
  • 1.77.0: C string literals, offset_of!

TODO

Before commit:

After commit:

Possible project targets

Miscellanea

- qemu-bridge-helper.c Re-write SUID C executable with useful features.

Devices

- hw/block/pflash_cfi01.c, hw/block/pflash_cfi02.c (claimed, WIP)

- hw/mem/nvdimm.c (suggested by Manos)

- hw/timer/i8254.c (claimed, WIP)