include bindgen or have an older version, it is recommended to install
a newer version using ``cargo install bindgen-cli``.
- Developers may want to use Cargo-based tools in the QEMU source tree;
- this requires Cargo 1.74.0. Note that Cargo is not required in order
- to build QEMU.
+ QEMU requires Rust 1.77.0. This is available on all supported platforms
+ with one exception, namely the ``mips64el`` architecture on Debian bookworm.
+ For all other 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``
+ (or newer) package. The path to ``rustc`` and ``rustdoc`` must be
+ provided manually to the configure script.
Optional build dependencies
Build components whose absence does not affect the ability to build QEMU
python3-venv \
python3-yaml \
rpm2cpio \
- rustc \
+ rustc-1.77 \
sed \
socat \
sparse \
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
+ENV RUSTC=/usr/bin/rustc-1.77
ENV CARGO_HOME=/usr/local/cargo
ENV PATH=$CARGO_HOME/bin:$PATH
RUN DEBIAN_FRONTEND=noninteractive eatmydata \
'RUN $CARGO --list\n',
]
-ubuntu2204_bindgen_extras = [
+ubuntu2204_rust_extras = [
+ "ENV RUSTC=/usr/bin/rustc-1.77\n",
"ENV CARGO_HOME=/usr/local/cargo\n",
'ENV PATH=$CARGO_HOME/bin:$PATH\n',
"RUN DEBIAN_FRONTEND=noninteractive eatmydata \\\n",
generate_dockerfile("fedora", "fedora-40")
generate_dockerfile("opensuse-leap", "opensuse-leap-15")
generate_dockerfile("ubuntu2204", "ubuntu-2204",
- trailer="".join(ubuntu2204_bindgen_extras))
+ trailer="".join(ubuntu2204_rust_extras))
#
# Non-fatal Rust-enabled build