From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-rust@nongnu.org
Subject: [PATCH 0/9] rust: allow minimum version of 1.77
Date: Fri, 2 May 2025 12:23:13 +0200 [thread overview]
Message-ID: <20250502102323.104815-1-pbonzini@redhat.com> (raw)
Debian bookworm provides Rust 1.78 on all architectures except for mips64el,
as part of its packaging of Firefox. Michael Tokarev confirmed that
it is not a problem at this point to require a rustup-based toolchain
when building for mips64el on bookworm.
This series therefore updates the minimum supported Rust version
to 1.77 (since 1.78 does not really add anything that QEMU needs).
It removes several temporary compatibility shims (including offset_of)
and enables the introduction of some more modern idioms, for example
cast_const()/cast_mut() and "let ... else". These were useful as early
experiments with procedural macros and with supporting old versions of
Rust, but are not needed anymore.
The remaining major obstacle is const_refs_static, which was stabilized
in 1.83.0 and allows for much-improved vmstate bindings. These were
prototyped by Zhao and myself and I'll post them shortly for reference.
It's unlikely that Debian bookworm will update rustc-web any further,
since the next Firefox ESR version is expected roughly at the same time
as the Debian trixie release.
Paolo
Paolo Bonzini (9):
lcitool: use Rust 1.78 for Debian bookworm
rust: use std::ffi instead of std::os::raw
rust: let bilge use "let ... else"
rust: qemu_api_macros: use "let ... else"
rust: use MaybeUninit::zeroed() in const context
rust: remove offset_of replacement
rust: replace c_str! with c"" literals
rust: enable clippy::ptr_cast_constness
docs: rust: update for newer minimum supported version
docs/about/build-platforms.rst | 7 +-
docs/devel/rust.rst | 38 +---
rust/Cargo.lock | 1 -
rust/Cargo.toml | 4 +-
rust/clippy.toml | 2 +-
rust/hw/char/pl011/Cargo.toml | 2 +-
rust/hw/char/pl011/src/device.rs | 4 +-
rust/hw/char/pl011/src/device_class.rs | 13 +-
rust/hw/char/pl011/src/lib.rs | 6 +-
rust/hw/timer/hpet/Cargo.toml | 2 +-
rust/hw/timer/hpet/src/fw_cfg.rs | 6 +-
rust/hw/timer/hpet/src/hpet.rs | 28 ++-
rust/hw/timer/hpet/src/lib.rs | 4 +-
rust/qemu-api-macros/Cargo.toml | 2 +-
rust/qemu-api-macros/src/lib.rs | 113 +++++-------
rust/qemu-api/Cargo.toml | 5 +-
rust/qemu-api/build.rs | 7 -
rust/qemu-api/meson.build | 5 -
rust/qemu-api/src/c_str.rs | 61 -------
rust/qemu-api/src/cell.rs | 6 +-
rust/qemu-api/src/chardev.rs | 5 +-
rust/qemu-api/src/irq.rs | 6 +-
rust/qemu-api/src/lib.rs | 7 +-
rust/qemu-api/src/memory.rs | 3 +-
rust/qemu-api/src/offset_of.rs | 168 ------------------
rust/qemu-api/src/qdev.rs | 9 +-
rust/qemu-api/src/qom.rs | 7 +-
rust/qemu-api/src/timer.rs | 4 +-
rust/qemu-api/src/vmstate.rs | 14 +-
rust/qemu-api/src/zeroable.rs | 104 ++---------
rust/qemu-api/tests/tests.rs | 11 +-
rust/qemu-api/tests/vmstate_tests.rs | 27 +--
subprojects/bilge-impl-0.2-rs.wrap | 2 -
.../packagefiles/bilge-impl-1.63.0.patch | 45 -----
tests/lcitool/mappings.yml | 3 +
35 files changed, 146 insertions(+), 585 deletions(-)
delete mode 100644 rust/qemu-api/src/c_str.rs
delete mode 100644 rust/qemu-api/src/offset_of.rs
delete mode 100644 subprojects/packagefiles/bilge-impl-1.63.0.patch
--
2.49.0
next reply other threads:[~2025-05-02 10:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-02 10:23 Paolo Bonzini [this message]
2025-05-02 10:23 ` [PATCH 1/9] lcitool: use Rust 1.78 for Debian bookworm Paolo Bonzini
2025-05-02 10:23 ` [PATCH 2/9] rust: use std::ffi instead of std::os::raw Paolo Bonzini
2025-05-02 10:57 ` Manos Pitsidianakis
2025-05-02 10:23 ` [PATCH 3/9] rust: let bilge use "let ... else" Paolo Bonzini
2025-05-02 12:44 ` Manos Pitsidianakis
2025-05-02 10:23 ` [PATCH 4/9] rust: qemu_api_macros: " Paolo Bonzini
2025-05-02 12:45 ` Manos Pitsidianakis
2025-05-02 10:23 ` [PATCH 5/9] rust: use MaybeUninit::zeroed() in const context Paolo Bonzini
2025-05-02 11:01 ` Manos Pitsidianakis
2025-05-02 12:22 ` Paolo Bonzini
2025-05-02 13:05 ` Manos Pitsidianakis
2025-05-02 10:23 ` [PATCH 6/9] rust: remove offset_of replacement Paolo Bonzini
2025-05-02 10:23 ` [PATCH 7/9] rust: replace c_str! with c"" literals Paolo Bonzini
2025-05-02 10:47 ` Manos Pitsidianakis
2025-05-02 10:53 ` Paolo Bonzini
2025-05-02 10:23 ` [PATCH 8/9] rust: enable clippy::ptr_cast_constness Paolo Bonzini
2025-05-02 11:09 ` Manos Pitsidianakis
2025-05-02 12:28 ` Paolo Bonzini
2025-05-02 18:57 ` Stefan Zabka
2025-05-02 19:32 ` Paolo Bonzini
2025-05-02 10:23 ` [PATCH 9/9] docs: rust: update for newer minimum supported version Paolo Bonzini
2025-05-02 10:54 ` [PATCH 0/9] rust: allow minimum version of 1.77 Manos Pitsidianakis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250502102323.104815-1-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).