Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ source accel/Kconfig
source target/Kconfig
source hw/Kconfig
source semihosting/Kconfig
source rust/Kconfig
3 changes: 0 additions & 3 deletions Kconfig.host
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,5 @@ config VFIO_USER_SERVER_ALLOWED
config HV_BALLOON_POSSIBLE
bool

config HAVE_RUST
bool

config MAC_PVG
bool
36 changes: 0 additions & 36 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1228,11 +1228,6 @@ F: tests/qtest/microbit-test.c
F: tests/functional/arm/test_microbit.py
F: docs/system/arm/nrf.rst

ARM PL011 Rust device
M: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
S: Maintained
F: rust/hw/char/pl011/

AVR Machines
-------------

Expand Down Expand Up @@ -3479,27 +3474,6 @@ F: hw/core/register.c
F: include/hw/register.h
F: include/hw/registerfields.h

Rust
M: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
S: Maintained
F: rust/bql/
F: rust/chardev/
F: rust/common/
F: rust/hw/core/
F: rust/migration/
F: rust/qemu-macros/
F: rust/qom/
F: rust/rustfmt.toml
F: rust/system/
F: rust/tests/
F: rust/util/
F: scripts/get-wraps-from-cargo-registry.py

Rust-related patches CC here
L: qemu-rust@nongnu.org
F: tests/docker/test-rust
F: rust/

SLIRP
M: Samuel Thibault <samuel.thibault@ens-lyon.org>
S: Maintained
Expand Down Expand Up @@ -4426,16 +4400,6 @@ F: docs/devel/qapi-domain.rst
F: scripts/kernel-doc
F: scripts/lib/kdoc/

Rust build system integration
M: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
L: qemu-rust@nongnu.org
S: Maintained
F: scripts/rust/
F: rust/.gitignore
F: rust/Kconfig
F: rust/meson.build
F: rust/wrapper.h

Miscellaneous
-------------
Performance Tools and Tests
Expand Down
3 changes: 0 additions & 3 deletions clippy.toml

This file was deleted.

181 changes: 0 additions & 181 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,6 @@ for opt do
;;
--objcc=*) objcc="$optarg"
;;
--rustc=*) RUSTC="$optarg"
;;
--rustdoc=*) RUSTDOC="$optarg"
;;
--cpu=*) cpu="$optarg"
;;
--extra-cflags=*)
Expand Down Expand Up @@ -256,8 +252,6 @@ python=
download="enabled"
skip_meson=no
use_containers="yes"
rust="disabled"
rust_target_triple=""
gdb_bin=$(command -v "gdb-multiarch" || command -v "gdb")
gdb_arches=""

Expand Down Expand Up @@ -324,8 +318,6 @@ windmc="${WINDMC-${cross_prefix}windmc}"
pkg_config="${PKG_CONFIG-${cross_prefix}pkg-config}"
sdl2_config="${SDL2_CONFIG-${cross_prefix}sdl2-config}"

rustc="${RUSTC-rustc}"
rustdoc="${RUSTDOC-rustdoc}"

check_define() {
cat > $TMPC <<EOF
Expand Down Expand Up @@ -660,10 +652,6 @@ for opt do
;;
--objcc=*)
;;
--rustc=*)
;;
--rustdoc=*)
;;
--make=*)
;;
--install=*)
Expand Down Expand Up @@ -783,14 +771,8 @@ for opt do
;;
--container-engine=*) container_engine="$optarg"
;;
--rust-target-triple=*) rust_target_triple="$optarg"
;;
--gdb=*) gdb_bin="$optarg"
;;
--enable-rust) rust=enabled
;;
--disable-rust) rust=disabled
;;
# everything else has the same name in configure and meson
--*) meson_option_parse "$opt" "$optarg"
;;
Expand Down Expand Up @@ -893,8 +875,6 @@ Advanced options (experts only):
at build time [$host_cc]
--cxx=CXX use C++ compiler CXX [$cxx]
--objcc=OBJCC use Objective-C compiler OBJCC [$objcc]
--rustc=RUSTC use Rust compiler RUSTC [$rustc]
--rustdoc=RUSTDOC use rustdoc binary RUSTDOC [$rustdoc]
--extra-cflags=CFLAGS append extra C compiler flags CFLAGS
--extra-cxxflags=CXXFLAGS append extra C++ compiler flags CXXFLAGS
--extra-objcflags=OBJCFLAGS append extra Objective C compiler flags OBJCFLAGS
Expand All @@ -905,7 +885,6 @@ Advanced options (experts only):
--python=PYTHON use specified python [$python]
--ninja=NINJA use specified ninja [$ninja]
--static enable static build [$static]
--rust-target-triple=TRIPLE compilation target for Rust code [autodetect]
--without-default-features default all --enable-* options to "disabled"
--without-default-devices do not include any device that is not needed to
start the emulator (only use if you are including
Expand Down Expand Up @@ -1180,142 +1159,6 @@ EOF
fi
fi

##########################################
# detect rust triple

meson_version=$($meson --version)
if test "$rust" != disabled && ! version_ge "$meson_version" 1.9.0; then
if test "$rust" = enabled; then
$mkvenv ensuregroup --dir "${source_path}/python/wheels" \
${source_path}/pythondeps.toml meson-rust || exit 1
else
echo "Rust needs Meson 1.9.0, disabling" 2>&1
rust=disabled
fi
fi
if test "$rust" != disabled && has "$rustc" && $rustc -vV > "${TMPDIR1}/${TMPB}.out"; then
rust_host_triple=$(sed -n 's/^host: //p' "${TMPDIR1}/${TMPB}.out")
else
if test "$rust" = enabled; then
error_exit "could not execute rustc binary \"$rustc\""
fi
rust=disabled
fi
if test "$rust" != disabled && test -z "$rust_target_triple"; then
# arch and os generally matches between meson and rust
rust_arch=$host_arch
rust_os=$host_os
rust_machine=unknown
rust_osvariant=

# tweak rust_os if needed; also, machine and variant depend on the OS
android=no
case "$host_os" in
darwin)
# e.g. aarch64-apple-darwin
rust_machine=apple
;;

linux)
# detect android/glibc/musl
if check_define __ANDROID__; then
rust_osvariant=android
android=yes
else
cat > $TMPC << EOF
#define _GNU_SOURCE
#include <features.h>
#ifndef __USE_GNU
error using musl
#endif
EOF
if compile_object; then
rust_osvariant=gnu
else
rust_osvariant=musl
fi
fi

case "$cpu" in
arm)
# e.g. arm-unknown-linux-gnueabi, arm-unknown-linux-gnueabihf
write_c_skeleton
compile_object
if $READELF -A $TMPO | grep Tag_API_VFP_args: > /dev/null; then
rust_osvariant=${rust_osvariant}eabihf
else
rust_osvariant=${rust_osvariant}eabi
fi
;;

mips64)
# e.g. mips64-unknown-linux-gnuabi64
rust_osvariant=${rust_osvariant}abi64
;;
esac
;;

netbsd)
# e.g. arm-unknown-netbsd-eabihf
test "$host_arch" = arm && rust_osvariant=eabihf
;;

sunos)
rust_machine=pc
rust_os=solaris
;;

windows)
# e.g. aarch64-pc-windows-gnullvm, x86_64-pc-windows-gnu (MSVC not supported)
rust_machine=pc
if test "$host_arch" = aarch64; then
rust_osvariant=gnullvm
else
rust_osvariant=gnu
fi
;;
esac

# now tweak the architecture part, possibly based on pre-canonicalization --cpu
case "$host_arch" in
arm)
# preserve ISA version (armv7 etc.) from $raw_cpu if passed via --cpu
rust_arch=$raw_cpu
test "$rust_arch" = arm && test "$rust_os" != linux && rust_arch=armv7
;;

mips)
# preserve ISA version (mipsisa64r6 etc.) and include endianness
rust_arch=${raw_cpu%el}
test "$bigendian" = no && rust_arch=${rust_arch}el
;;

riscv32|riscv64)
# e.g. riscv64gc-unknown-linux-gnu, but riscv64-linux-android
test "$android" = no && rust_arch=${rust_arch}gc
;;

sparc64)
if test "$rust_os" = solaris; then
rust_arch=sparcv9
rust_machine=sun
fi
;;

x86_64)
# e.g. x86_64-unknown-linux-gnux32
test "$raw_cpu" = x32 && rust_osvariant=${rust_osvariant}x32
;;
esac

if test "$android" = yes; then
# e.g. aarch64-linux-android
rust_target_triple=$rust_arch-$rust_os-$rust_osvariant
else
rust_target_triple=$rust_arch-$rust_machine-$rust_os${rust_osvariant:+-$rust_osvariant}
fi
fi

##########################################
# functions to probe cross compilers

Expand Down Expand Up @@ -1782,9 +1625,6 @@ if test "$container" != no; then
echo "RUNC=$runc" >> $config_host_mak
fi
echo "SUBDIRS=$subdirs" >> $config_host_mak
if test "$rust" != disabled; then
echo "RUST_TARGET_TRIPLE=$rust_target_triple" >> $config_host_mak
fi
echo "PYTHON=$python" >> $config_host_mak
echo "MKVENV_ENSUREGROUP=$mkvenv ensuregroup $mkvenv_online_flag" >> $config_host_mak
echo "GENISOIMAGE=$genisoimage" >> $config_host_mak
Expand Down Expand Up @@ -1912,15 +1752,6 @@ if test "$skip_meson" = no; then
echo "c = [$(meson_quote $cc $CPU_CFLAGS)]" >> $cross
test -n "$cxx" && echo "cpp = [$(meson_quote $cxx $CPU_CFLAGS)]" >> $cross
test -n "$objcc" && echo "objc = [$(meson_quote $objcc $CPU_CFLAGS)]" >> $cross
if test "$rust" != disabled; then
if test "$rust_host_triple" != "$rust_target_triple"; then
echo "rust = [$(meson_quote $rustc --target "$rust_target_triple")]" >> $cross
echo "rustdoc = [$(meson_quote $rustdoc --target "$rust_target_triple")]" >> $cross
else
echo "rust = [$(meson_quote $rustc)]" >> $cross
echo "rustdoc = [$(meson_quote $rustdoc)]" >> $cross
fi
fi
echo "ar = [$(meson_quote $ar)]" >> $cross
echo "dlltool = [$(meson_quote $dlltool)]" >> $cross
echo "nm = [$(meson_quote $nm)]" >> $cross
Expand Down Expand Up @@ -1957,9 +1788,6 @@ if test "$skip_meson" = no; then
echo "# Automatically generated by configure - do not modify" > $native
echo "[binaries]" >> $native
echo "c = [$(meson_quote $host_cc)]" >> $native
if test "$rust" != disabled; then
echo "rust = [$(meson_quote $rustc)]" >> $cross
fi
mv $native config-meson.native
meson_option_add --native-file
meson_option_add config-meson.native
Expand All @@ -1978,7 +1806,6 @@ if test "$skip_meson" = no; then
test "$pie" = no && meson_option_add -Db_pie=false

# QEMU options
test "$rust" != "disabled" && meson_option_add "-Drust=$rust"
test "$cfi" != false && meson_option_add "-Dcfi=$cfi" "-Db_lto=$cfi"
test "$docs" != auto && meson_option_add "-Ddocs=$docs"
test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
Expand Down Expand Up @@ -2063,11 +1890,3 @@ echo ' "$@"' >>config.status
chmod +x config.status

rm -r "$TMPDIR1"

if test "$rust" != disabled; then
echo
echo 'INFO: Rust bindings generation with `bindgen` might fail in some cases where'
echo 'the detected `libclang` does not match the expected `clang` version/target. In'
echo 'this case you must pass the path to `clang` and `libclang` to your build'
echo 'command invocation using the environment variables CLANG_PATH and LIBCLANG_PATH'
fi
26 changes: 0 additions & 26 deletions docs/about/build-platforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,32 +110,6 @@ Python build dependencies
required, it may be necessary to fetch python modules from the Python
Package Index (PyPI) via ``pip``, in order to build QEMU.

Rust build dependencies
QEMU is generally conservative in adding new Rust dependencies, and all
of them are included in the distributed tarballs. One exception is the
bindgen tool, which is too big to package and distribute. The minimum
supported version of bindgen is 0.60.x. For distributions that do not
include bindgen or have an older version, it is recommended to install
a newer version using ``cargo install bindgen-cli``.

QEMU requires Rust 1.83.0. This is available on all supported platforms
with two exception: Ubuntu LTS releases 22.04 and 24.04, and the
``mips64el`` architecture on Debian bookworm. For all other
architectures, Debian bookworm provides a new-enough Rust compiler
in the ``rustc-web`` package.

It is expected that in the future Ubuntu will provide updated packages
like the existing ``rustc-1.82`` package. The path to ``rustc`` and
``rustdoc`` will have to be provided manually to the configure script.

Some distros prefer to avoid vendored crate sources, and instead use
local sources from e.g. ``/usr/share/cargo/registry``. QEMU includes a
script, ``scripts/get-wraps-from-cargo-registry.py``, that automatically
performs this task. The script is meant to be invoked after unpacking
the QEMU tarball. QEMU also includes ``rust/Cargo.toml`` and
``rust/Cargo.lock`` files that can be used to compute QEMU's build
dependencies, e.g. using ``cargo2rpm -p rust/Cargo.toml buildrequires``.

Optional build dependencies
Build components whose absence does not affect the ability to build QEMU
may not be available in distros, or may be too old for our requirements.
Expand Down
3 changes: 0 additions & 3 deletions docs/devel/codebase.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ yet, so sometimes the source code is all you have.
* `roms <https://gitlab.com/qemu-project/qemu/-/tree/master/roms>`_:
Contains source code for various firmware and ROMs, which can be compiled if
custom or updated versions are needed.
* `rust <https://gitlab.com/qemu-project/qemu/-/tree/master/rust>`_:
Rust integration in QEMU. It contains the new interfaces defined and
associated devices using it.
* `scripts <https://gitlab.com/qemu-project/qemu/-/tree/master/scripts>`_:
Collection of scripts used in build and test systems, and various
tools for QEMU codebase and execution traces.
Expand Down
Loading
Loading