mirror of
https://github.com/qemu/qemu.git
synced 2026-02-04 02:24:51 +00:00
meson, cargo: require Rust 1.83.0
Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250908105005.2119297-4-pbonzini@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
doc-valid-idents = ["IrDA", "PrimeCell", ".."]
|
doc-valid-idents = ["IrDA", "PrimeCell", ".."]
|
||||||
allow-mixed-uninlined-format-args = false
|
allow-mixed-uninlined-format-args = false
|
||||||
msrv = "1.77.0"
|
msrv = "1.83.0"
|
||||||
|
|||||||
@@ -118,14 +118,15 @@ Rust build dependencies
|
|||||||
include bindgen or have an older version, it is recommended to install
|
include bindgen or have an older version, it is recommended to install
|
||||||
a newer version using ``cargo install bindgen-cli``.
|
a newer version using ``cargo install bindgen-cli``.
|
||||||
|
|
||||||
QEMU requires Rust 1.77.0. This is available on all supported platforms
|
QEMU requires Rust 1.83.0. This is available on all supported platforms
|
||||||
with one exception, namely the ``mips64el`` architecture on Debian bookworm.
|
with two exception: Ubuntu LTS releases 22.04 and 24.04, and the
|
||||||
For all other architectures, Debian bookworm provides a new-enough Rust
|
``mips64el`` architecture on Debian bookworm. For all other
|
||||||
compiler in the ``rustc-web`` package.
|
architectures, Debian bookworm provides a new-enough Rust compiler
|
||||||
|
in the ``rustc-web`` package.
|
||||||
|
|
||||||
Also, on Ubuntu 22.04 or 24.04 this requires the ``rustc-1.77``
|
It is expected that in the future Ubuntu will provide updated packages
|
||||||
(or newer) package. The path to ``rustc`` and ``rustdoc`` must be
|
like the existing ``rustc-1.82`` package. The path to ``rustc`` and
|
||||||
provided manually to the configure script.
|
``rustdoc`` will have to be provided manually to the configure script.
|
||||||
|
|
||||||
Some distros prefer to avoid vendored crate sources, and instead use
|
Some distros prefer to avoid vendored crate sources, and instead use
|
||||||
local sources from e.g. ``/usr/share/cargo/registry``. QEMU includes a
|
local sources from e.g. ``/usr/share/cargo/registry``. QEMU includes a
|
||||||
|
|||||||
@@ -75,21 +75,17 @@ Note that doctests require all ``.o`` files from the build to be available.
|
|||||||
Supported tools
|
Supported tools
|
||||||
'''''''''''''''
|
'''''''''''''''
|
||||||
|
|
||||||
QEMU supports rustc version 1.77.0 and newer. Notably, the following features
|
QEMU supports rustc version 1.83.0 and newer. The following features
|
||||||
are missing:
|
from relatively new versions of Rust are not used for historical reasons;
|
||||||
|
patches are welcome:
|
||||||
|
|
||||||
* inline const expression (stable in 1.79.0), currently worked around with
|
* inline const expression (stable in 1.79.0), currently worked around with
|
||||||
associated constants in the ``FnCall`` trait.
|
associated constants in the ``FnCall`` trait.
|
||||||
|
|
||||||
* associated constants have to be explicitly marked ``'static`` (`changed in
|
* associated constants are still explicitly marked ``'static`` (`changed in
|
||||||
1.81.0`__)
|
1.81.0`__)
|
||||||
|
|
||||||
* ``&raw`` (stable in 1.82.0). Use ``addr_of!`` and ``addr_of_mut!`` instead,
|
* ``&raw`` (stable in 1.82.0).
|
||||||
though hopefully the need for raw pointers will go down over time.
|
|
||||||
|
|
||||||
* ``new_uninit`` (stable in 1.82.0). This is used internally by the ``pinned_init``
|
|
||||||
crate, which is planned for inclusion in QEMU, but it can be easily patched
|
|
||||||
out.
|
|
||||||
|
|
||||||
* referencing statics in constants (stable in 1.83.0). For now use a const
|
* referencing statics in constants (stable in 1.83.0). For now use a const
|
||||||
function; this is an important limitation for QEMU's migration stream
|
function; this is an important limitation for QEMU's migration stream
|
||||||
|
|||||||
@@ -94,12 +94,12 @@ have_rust = have_rust and add_languages('rust', native: true,
|
|||||||
required: get_option('rust').disable_auto_if(not have_system))
|
required: get_option('rust').disable_auto_if(not have_system))
|
||||||
if have_rust
|
if have_rust
|
||||||
rustc = meson.get_compiler('rust')
|
rustc = meson.get_compiler('rust')
|
||||||
if rustc.version().version_compare('<1.77.0')
|
if rustc.version().version_compare('<1.83.0')
|
||||||
if get_option('rust').enabled()
|
if get_option('rust').enabled()
|
||||||
error('rustc version ' + rustc.version() + ' is unsupported. Please upgrade to at least 1.77.0')
|
error('rustc version ' + rustc.version() + ' is unsupported. Please upgrade to at least 1.83.0')
|
||||||
else
|
else
|
||||||
warning('rustc version ' + rustc.version() + ' is unsupported, disabling Rust compilation.')
|
warning('rustc version ' + rustc.version() + ' is unsupported, disabling Rust compilation.')
|
||||||
message('Please upgrade to at least 1.77.0 to use Rust.')
|
message('Please upgrade to at least 1.83.0 to use Rust.')
|
||||||
have_rust = false
|
have_rust = false
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ edition = "2021"
|
|||||||
homepage = "https://www.qemu.org"
|
homepage = "https://www.qemu.org"
|
||||||
license = "GPL-2.0-or-later"
|
license = "GPL-2.0-or-later"
|
||||||
repository = "https://gitlab.com/qemu-project/qemu/"
|
repository = "https://gitlab.com/qemu-project/qemu/"
|
||||||
rust-version = "1.77.0"
|
rust-version = "1.83.0"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
anyhow = "~1.0"
|
anyhow = "~1.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user