Repository: cross-rs/cross
Pull request #907 (2022-07-03 20:12:55)

wiki check toml


Patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f535b5f..80e89bf 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -158,7 +158,7 @@ jobs:
             - { target: aarch64-unknown-linux-gnu,        os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system }
             - { target: arm-unknown-linux-gnueabi,        os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1 }
             - { target: arm-unknown-linux-gnueabihf,      os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1 }
-            - { target: armv7-unknown-linux-gnueabi,      os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user }
+            - { target: armv7-unknown-linux-gnueabi,    os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system }
             - { target: armv7-unknown-linux-gnueabihf,    os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system }
             - { target: thumbv7neon-unknown-linux-gnueabihf, os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system }
             - { target: i586-unknown-linux-gnu,           os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1 }
@@ -175,27 +175,27 @@ jobs:
             - { target: riscv64gc-unknown-linux-gnu,      os: ubuntu-latest,  cpp: 1,           std: 1, run: 1 }
             - { target: s390x-unknown-linux-gnu,          os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-system }
             - { target: sparc64-unknown-linux-gnu,        os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-system }
-            - { target: aarch64-unknown-linux-musl,       os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1 }
-            - { target: arm-unknown-linux-musleabihf,     os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1 }
-            - { target: arm-unknown-linux-musleabi,       os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1 }
-            - { target: armv5te-unknown-linux-gnueabi,    os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1 }
-            - { target: armv5te-unknown-linux-musleabi,   os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1 }
-            - { target: armv7-unknown-linux-musleabi,     os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1 }
-            - { target: armv7-unknown-linux-musleabihf,   os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1 }
-            - { target: i586-unknown-linux-musl,          os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user }
-            - { target: i686-unknown-linux-musl,          os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user }
-            - { target: mips-unknown-linux-musl,          os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1 }
-            - { target: mipsel-unknown-linux-musl,        os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, run: 1 }
+            - { target: aarch64-unknown-linux-musl,       os: ubuntu-latest,                    std: 1, run: 1 }
+            - { target: arm-unknown-linux-musleabihf,     os: ubuntu-latest,                    std: 1, run: 1 }
+            - { target: arm-unknown-linux-musleabi,       os: ubuntu-latest,                    std: 1, run: 1 }
+            - { target: armv5te-unknown-linux-gnueabi,    os: ubuntu-latest,                    std: 1, run: 1 }
+            - { target: armv5te-unknown-linux-musleabi,   os: ubuntu-latest,                    std: 1, run: 1 }
+            - { target: armv7-unknown-linux-musleabi,   os: ubuntu-latest,                    std: 1, run: 1 }
+            - { target: armv7-unknown-linux-musleabihf,   os: ubuntu-latest,                    std: 1, run: 1 }
+            - { target: i586-unknown-linux-musl,          os: ubuntu-latest,                    std: 1, run: 1 }
+            - { target: i686-unknown-linux-musl,          os: ubuntu-latest,                    std: 1, run: 1 }
+            - { target: mips-unknown-linux-musl,          os: ubuntu-latest,  cpp: 1,           std: 1, run: 1 }
+            - { target: mipsel-unknown-linux-musl,        os: ubuntu-latest,  cpp: 1,           std: 1, run: 1 }
             - { target: aarch64-linux-android,            os: ubuntu-latest,  cpp: 1,           std: 1, run: 1, runners: qemu-user }
             - { target: arm-linux-androideabi,            os: ubuntu-latest,  cpp: 1,           std: 1, run: 1, runners: qemu-user }
             - { target: armv7-linux-androideabi,          os: ubuntu-latest,  cpp: 1,           std: 1, run: 1, runners: qemu-user }
-            - { target: thumbv7neon-linux-androideabi,    os: ubuntu-latest,  cpp: 1,           std: 1, run: 1, runners: qemu-user }
+            - { target: thumbv7neon-linux-androideabi,          os: ubuntu-latest,  cpp: 1,           std: 1, run: 1, runners: qemu-user }
             - { target: i686-linux-android,               os: ubuntu-latest,  cpp: 1,           std: 1, run: 1, runners: qemu-user }
             - { target: x86_64-linux-android,             os: ubuntu-latest,  cpp: 1,           std: 1, run: 1, runners: qemu-user }
             - { target: x86_64-pc-windows-gnu,            os: ubuntu-latest,  cpp: 1,           std: 1, run: 1 }
             - { target: i686-pc-windows-gnu,              os: ubuntu-latest,  cpp: 1,           std: 1, run: 1 }
             # Disabled for now, see https://github.com/rust-lang/rust/issues/98216
-            #-{ target: asmjs-unknown-emscripten,         os: ubuntu-latest,  cpp: 1,           std: 1, run: 1 }
+            #- { target: asmjs-unknown-emscripten,         os: ubuntu-latest,  cpp: 1,           std: 1, run: 1 }
             - { target: wasm32-unknown-emscripten,        os: ubuntu-latest,  cpp: 1,           std: 1, run: 1 }
             - { target: x86_64-unknown-dragonfly,         os: ubuntu-latest,  cpp: 1, dylib: 1, std: 1, build-std: 1 }
             - { target: i686-unknown-freebsd,             os: ubuntu-latest,          dylib: 1, std: 1 }
diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml
index f6f5cc5..0e34792 100644
--- a/.github/workflows/weekly.yml
+++ b/.github/workflows/weekly.yml
@@ -24,6 +24,18 @@ jobs:
       - name: Build Docker image
         id: build-docker-image
         run: cargo xtask build-docker-image -v --no-cache --no-output --from-ci --no-fastfail --tag weekly
+        timeout-minutes: 1440
+  wiki:
+    name: Ensure wiki is valid
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+      - uses: ./.github/actions/setup-rust
+      - run: git clone ${wikirepo}
+        shell: bash
+        env:
+          wikirepo: https://github.com/${{ github.repository }}.wiki.git
+      - run: cargo test toml_check -- --nocapture
   cargo-deny:
     runs-on: ubuntu-latest
     steps:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6db56e7..7add3e8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,8 +9,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
 
 ### Added
 
-- #905 - added `qemu-runner` for musl images, allowing use of native or emulated runners.
-- #905 - added qemu emulation to `i586-unknown-linux-gnu`, `i686-unknown-linux-musl`, and `i586-unknown-linux-gnu`, so they can run on an `x86` CPU, rather than an `x86_64` CPU.
 - #900 - add the option to skip copying build artifacts back to host when using remote cross via `CROSS_REMOTE_SKIP_BUILD_ARTIFACTS`.
 - #891 - support custom user namespace overrides by setting the `CROSS_CONTAINER_USER_NAMESPACE` environment variable. 
 - #890 - support rootless docker via the `CROSS_ROOTLESS_CONTAINER_ENGINE` environment variable.
@@ -22,7 +20,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
 
 ### Fixed
 
-- #905 - fixed running dynamically-linked libraries for all musl targets except `x86_64-unknown-linux-musl`.
 - #904 - ensure `cargo metadata` works by using the same channel.
 - #904 - fixed the path for workspace volumes and passthrough volumes with docker-in-docker.
 - #898 - fix the path to the mount root with docker-in-docker if mounting volumes.
diff --git a/README.md b/README.md
index e1d7c95..6f8a690 100644
--- a/README.md
+++ b/README.md
@@ -91,7 +91,7 @@ You have three options to configure `cross`. All of these options use the TOML f
 You can directly set [configuration values](docs/cross_toml.md) in your `Cargo.toml` file, under the `[package.metadata.cross]` table, i.e. key prefix.
 An example config snippet would look like this:
 
-```
+```toml,cargo
 [package.metadata.cross.target.aarch64-unknown-linux-gnu]
 xargo = false
 image = "test-image"
diff --git a/docker/Dockerfile.aarch64-unknown-linux-musl b/docker/Dockerfile.aarch64-unknown-linux-musl
index cfb7e4d..7aaacf2 100644
--- a/docker/Dockerfile.aarch64-unknown-linux-musl
+++ b/docker/Dockerfile.aarch64-unknown-linux-musl
@@ -16,18 +16,17 @@ RUN /qemu.sh aarch64
 COPY musl.sh /
 RUN /musl.sh TARGET=aarch64-linux-musl
 
-ENV CROSS_MUSL_SYSROOT=/usr/local/aarch64-linux-musl
-COPY musl-symlink.sh /
-RUN /musl-symlink.sh $CROSS_MUSL_SYSROOT aarch64
+# Allows qemu run dynamic linked binaries
+RUN ln -sf \
+    /usr/local/aarch64-linux-musl/lib/libc.so \
+    /usr/local/aarch64-linux-musl/lib/ld-musl-aarch64.so.1
 
 COPY aarch64-linux-musl-gcc.sh /usr/bin/
 
-COPY qemu-runner /
-
 ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-musl-gcc.sh \
-    CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUNNER="/qemu-runner aarch64" \
+    CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUNNER=qemu-aarch64 \
     CC_aarch64_unknown_linux_musl=aarch64-linux-musl-gcc \
     CXX_aarch64_unknown_linux_musl=aarch64-linux-musl-g++ \
-    BINDGEN_EXTRA_CLANG_ARGS_aarch64_unknown_linux_musl="--sysroot=$CROSS_MUSL_SYSROOT" \
-    QEMU_LD_PREFIX=$CROSS_MUSL_SYSROOT \
+    BINDGEN_EXTRA_CLANG_ARGS_aarch64_unknown_linux_musl="--sysroot=/usr/local/aarch64-linux-musl" \
+    QEMU_LD_PREFIX=/usr/local/aarch64-linux-musl \
     RUST_TEST_THREADS=1
diff --git a/docker/Dockerfile.arm-unknown-linux-gnueabi b/docker/Dockerfile.arm-unknown-linux-gnueabi
index 7d6dcd8..2899602 100644
--- a/docker/Dockerfile.arm-unknown-linux-gnueabi
+++ b/docker/Dockerfile.arm-unknown-linux-gnueabi
@@ -16,10 +16,8 @@ RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
     libc6-dev-armel-cross && \
     /qemu.sh arm
 
-COPY qemu-runner /
-
 ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_LINKER=arm-linux-gnueabi-gcc \
-    CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_RUNNER="/qemu-runner arm" \
+    CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_RUNNER=qemu-arm \
     CC_arm_unknown_linux_gnueabi=arm-linux-gnueabi-gcc \
     CXX_arm_unknown_linux_gnueabi=arm-linux-gnueabi-g++ \
     BINDGEN_EXTRA_CLANG_ARGS_arm_unknown_linux_gnueabi="--sysroot=/usr/arm-linux-gnueabi" \
diff --git a/docker/Dockerfile.arm-unknown-linux-gnueabihf b/docker/Dockerfile.arm-unknown-linux-gnueabihf
index c0d56c7..9d35da8 100644
--- a/docker/Dockerfile.arm-unknown-linux-gnueabihf
+++ b/docker/Dockerfile.arm-unknown-linux-gnueabihf
@@ -19,10 +19,8 @@ ENV PATH /x-tools/arm-unknown-linux-gnueabihf/bin/:$PATH
 COPY qemu.sh /
 RUN /qemu.sh arm
 
-COPY qemu-runner /
-
 ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-unknown-linux-gnueabihf-gcc \
-    CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER="/qemu-runner arm" \
+    CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER=qemu-arm \
     CC_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-gcc \
     CXX_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-g++ \
     BINDGEN_EXTRA_CLANG_ARGS_arm_unknown_linux_gnueabihf="--sysroot=/x-tools/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/sysroot/" \
diff --git a/docker/Dockerfile.arm-unknown-linux-musleabi b/docker/Dockerfile.arm-unknown-linux-musleabi
index 2a3844b..ac2f925 100644
--- a/docker/Dockerfile.arm-unknown-linux-musleabi
+++ b/docker/Dockerfile.arm-unknown-linux-musleabi
@@ -20,16 +20,15 @@ RUN /musl.sh \
                       --with-float=soft \
                       --with-mode=arm"
 
-ENV CROSS_MUSL_SYSROOT=/usr/local/arm-linux-musleabi
-COPY musl-symlink.sh /
-RUN /musl-symlink.sh $CROSS_MUSL_SYSROOT arm
-
-COPY qemu-runner /
+# Allows qemu run dynamic linked binaries
+RUN ln -sf \
+    /usr/local/arm-linux-musleabi/lib/libc.so \
+    /usr/local/arm-linux-musleabi/lib/ld-musl-arm.so.1
 
 ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABI_LINKER=arm-linux-musleabi-gcc \
-    CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABI_RUNNER="/qemu-runner arm" \
+    CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABI_RUNNER=qemu-arm \
     CC_arm_unknown_linux_musleabi=arm-linux-musleabi-gcc \
     CXX_arm_unknown_linux_musleabi=arm-linux-musleabi-g++ \
-    BINDGEN_EXTRA_CLANG_ARGS_arm_unknown_linux_musleabi="--sysroot=$CROSS_MUSL_SYSROOT" \
-    QEMU_LD_PREFIX=$CROSS_MUSL_SYSROOT \
+    BINDGEN_EXTRA_CLANG_ARGS_arm_unknown_linux_musleabi="--sysroot=/usr/local/arm-linux-musleabi" \
+    QEMU_LD_PREFIX=/usr/local/arm-linux-musleabi \
     RUST_TEST_THREADS=1
diff --git a/docker/Dockerfile.arm-unknown-linux-musleabihf b/docker/Dockerfile.arm-unknown-linux-musleabihf
index d012d38..c538e6a 100644
--- a/docker/Dockerfile.arm-unknown-linux-musleabihf
+++ b/docker/Dockerfile.arm-unknown-linux-musleabihf
@@ -21,16 +21,15 @@ RUN /musl.sh \
                       --with-float=hard \
                       --with-mode=arm"
 
-ENV CROSS_MUSL_SYSROOT=/usr/local/arm-linux-musleabihf
-COPY musl-symlink.sh /
-RUN /musl-symlink.sh $CROSS_MUSL_SYSROOT armhf
-
-COPY qemu-runner /
+# Allows qemu run dynamic linked binaries
+RUN ln -sf \
+    /usr/local/arm-linux-musleabihf/lib/libc.so \
+    /usr/local/arm-linux-musleabihf/lib/ld-musl-armhf.so.1
 
 ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_LINKER=arm-linux-musleabihf-gcc \
-    CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_RUNNER="/qemu-runner arm" \
+    CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_RUNNER=qemu-arm \
     CC_arm_unknown_linux_musleabihf=arm-linux-musleabihf-gcc \
     CXX_arm_unknown_linux_musleabihf=arm-linux-musleabihf-g++ \
-    BINDGEN_EXTRA_CLANG_ARGS_arm_unknown_linux_musleabihf="--sysroot=$CROSS_MUSL_SYSROOT" \
-    QEMU_LD_PREFIX=$CROSS_MUSL_SYSROOT \
+    BINDGEN_EXTRA_CLANG_ARGS_arm_unknown_linux_musleabihf="--sysroot=/usr/local/arm-linux-musleabihf" \
+    QEMU_LD_PREFIX=/usr/local/arm-linux-musleabihf \
     RUST_TEST_THREADS=1
diff --git a/docker/Dockerfile.armv5te-unknown-linux-gnueabi b/docker/Dockerfile.armv5te-unknown-linux-gnueabi
index 3c9f618..73bda0f 100644
--- a/docker/Dockerfile.armv5te-unknown-linux-gnueabi
+++ b/docker/Dockerfile.armv5te-unknown-linux-gnueabi
@@ -17,10 +17,8 @@ RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
     libc6-dev-armel-cross && \
     /qemu.sh arm
 
-COPY qemu-runner /
-
 ENV CARGO_TARGET_ARMV5TE_UNKNOWN_LINUX_GNUEABI_LINKER=arm-linux-gnueabi-gcc \
-    CARGO_TARGET_ARMV5TE_UNKNOWN_LINUX_GNUEABI_RUNNER="/qemu-runner arm" \
+    CARGO_TARGET_ARMV5TE_UNKNOWN_LINUX_GNUEABI_RUNNER=qemu-arm \
     CC_armv5te_unknown_linux_gnueabi=arm-linux-gnueabi-gcc \
     CXX_armv5te_unknown_linux_gnueabi=arm-linux-gnueabi-g++ \
     BINDGEN_EXTRA_CLANG_ARGS_armv5te_unknown_linux_gnueabi="--sysroot=/usr/arm-linux-gnueabi" \
diff --git a/docker/Dockerfile.armv5te-unknown-linux-musleabi b/docker/Dockerfile.armv5te-unknown-linux-musleabi
index a87d3fd..610dc9a 100644
--- a/docker/Dockerfile.armv5te-unknown-linux-musleabi
+++ b/docker/Dockerfile.armv5te-unknown-linux-musleabi
@@ -20,16 +20,15 @@ RUN /musl.sh \
                       --with-float=soft \
                       --with-mode=arm"
 
-ENV CROSS_MUSL_SYSROOT=/usr/local/arm-linux-musleabi
-COPY musl-symlink.sh /
-RUN /musl-symlink.sh $CROSS_MUSL_SYSROOT arm
-
-COPY qemu-runner /
+# Allows qemu run dynamic linked binaries
+RUN ln -sf \
+    /usr/local/arm-linux-musleabi/lib/libc.so \
+    /usr/local/arm-linux-musleabi/lib/ld-musl-arm.so.1
 
 ENV CARGO_TARGET_ARMV5TE_UNKNOWN_LINUX_MUSLEABI_LINKER=arm-linux-musleabi-gcc \
-    CARGO_TARGET_ARMV5TE_UNKNOWN_LINUX_MUSLEABI_RUNNER="/qemu-runner arm" \
+    CARGO_TARGET_ARMV5TE_UNKNOWN_LINUX_MUSLEABI_RUNNER=qemu-arm \
     CC_armv5te_unknown_linux_musleabi=arm-linux-musleabi-gcc \
     CXX_armv5te_unknown_linux_musleabi=arm-linux-musleabi-g++ \
-    BINDGEN_EXTRA_CLANG_ARGS_armv5te_unknown_linux_musleabi="--sysroot=$CROSS_MUSL_SYSROOT" \
-    QEMU_LD_PREFIX=$CROSS_MUSL_SYSROOT \
+    BINDGEN_EXTRA_CLANG_ARGS_armv5te_unknown_linux_musleabi="--sysroot=/usr/arm-linux-musleabi" \
+    QEMU_LD_PREFIX=/usr/local/arm-linux-musleabi \
     RUST_TEST_THREADS=1
diff --git a/docker/Dockerfile.armv7-unknown-linux-gnueabi b/docker/Dockerfile.armv7-unknown-linux-gnueabi
index c8bffaa..9b16848 100644
--- a/docker/Dockerfile.armv7-unknown-linux-gnueabi
+++ b/docker/Dockerfile.armv7-unknown-linux-gnueabi
@@ -17,10 +17,8 @@ RUN apt-get install --assume-yes --no-install-recommends \
 COPY qemu.sh /
 RUN /qemu.sh arm
 
-COPY qemu-runner /
-
 ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABI_LINKER=arm-linux-gnueabi-gcc \
-    CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABI_RUNNER="/qemu-runner armv7" \
+    CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABI_RUNNER=qemu-arm \
     CC_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-gcc \
     CXX_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-g++ \
     BINDGEN_EXTRA_CLANG_ARGS_armv7_unknown_linux_gnueabi="--sysroot=/usr/arm-linux-gnueabi" \
diff --git a/docker/Dockerfile.armv7-unknown-linux-musleabi b/docker/Dockerfile.armv7-unknown-linux-musleabi
index ab1a965..9701182 100644
--- a/docker/Dockerfile.armv7-unknown-linux-musleabi
+++ b/docker/Dockerfile.armv7-unknown-linux-musleabi
@@ -21,16 +21,15 @@ RUN /musl.sh \
                       --with-mode=thumb \
                       --with-mode=arm"
 
-ENV CROSS_MUSL_SYSROOT=/usr/local/arm-linux-musleabi
-COPY musl-symlink.sh /
-RUN /musl-symlink.sh $CROSS_MUSL_SYSROOT arm
-
-COPY qemu-runner /
+# Allows qemu run dynamic linked binaries
+RUN ln -sf \
+    /usr/local/arm-linux-musleabi/lib/libc.so \
+    /usr/local/arm-linux-musleabi/lib/ld-musl-arm.so.1
 
 ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABI_LINKER=arm-linux-musleabi-gcc \
-    CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABI_RUNNER="/qemu-runner armv7" \
+    CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABI_RUNNER=qemu-arm \
     CC_armv7_unknown_linux_musleabi=arm-linux-musleabi-gcc \
     CXX_armv7_unknown_linux_musleabi=arm-linux-musleabi-g++ \
-    BINDGEN_EXTRA_CLANG_ARGS_armv7_unknown_linux_musleabi="--sysroot=$CROSS_MUSL_SYSROOT" \
-    QEMU_LD_PREFIX=$CROSS_MUSL_SYSROOT \
+    BINDGEN_EXTRA_CLANG_ARGS_armv7_unknown_linux_musleabi="--sysroot=/usr/local/arm-linux-musleabi" \
+    QEMU_LD_PREFIX=/usr/local/arm-linux-musleabi \
     RUST_TEST_THREADS=1
diff --git a/docker/Dockerfile.armv7-unknown-linux-musleabihf b/docker/Dockerfile.armv7-unknown-linux-musleabihf
index 3742465..52b44c6 100644
--- a/docker/Dockerfile.armv7-unknown-linux-musleabihf
+++ b/docker/Dockerfile.armv7-unknown-linux-musleabihf
@@ -21,16 +21,15 @@ RUN /musl.sh \
                       --with-mode=thumb \
                       --with-fpu=vfp"
 
-ENV CROSS_MUSL_SYSROOT=/usr/local/arm-linux-musleabihf
-COPY musl-symlink.sh /
-RUN /musl-symlink.sh $CROSS_MUSL_SYSROOT armhf
-
-COPY qemu-runner /
+# Allows qemu run dynamic linked binaries
+RUN ln -sf \
+    /usr/local/arm-linux-musleabihf/lib/libc.so \
+    /usr/local/arm-linux-musleabihf/lib/ld-musl-armhf.so.1
 
 ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER=arm-linux-musleabihf-gcc \
-    CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_RUNNER="/qemu-runner armv7" \
+    CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_RUNNER=qemu-arm \
     CC_armv7_unknown_linux_musleabihf=arm-linux-musleabihf-gcc \
     CXX_armv7_unknown_linux_musleabihf=arm-linux-musleabihf-g++ \
-    BINDGEN_EXTRA_CLANG_ARGS_armv7_unknown_linux_musleabihf="--sysroot=$CROSS_MUSL_SYSROOT" \
-    QEMU_LD_PREFIX=$CROSS_MUSL_SYSROOT \
+    BINDGEN_EXTRA_CLANG_ARGS_armv7_unknown_linux_musleabihf="--sysroot=/usr/local/arm-linux-musleabihf" \
+    QEMU_LD_PREFIX=/usr/local/arm-linux-musleabihf \
     RUST_TEST_THREADS=1
diff --git a/docker/Dockerfile.i586-unknown-linux-gnu b/docker/Dockerfile.i586-unknown-linux-gnu
index 1e5610f..9c6bc88 100644
--- a/docker/Dockerfile.i586-unknown-linux-gnu
+++ b/docker/Dockerfile.i586-unknown-linux-gnu
@@ -13,10 +13,4 @@ RUN /xargo.sh
 RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
     g++-multilib
 
-COPY qemu.sh /
-RUN /qemu.sh i386
-
-COPY qemu-runner /
-
-ENV CARGO_TARGET_I586_UNKNOWN_LINUX_GNU_RUNNER="/qemu-runner i586" \
-    PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"
+ENV PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig/:${PKG_CONFIG_PATH}"
diff --git a/docker/Dockerfile.i586-unknown-linux-musl b/docker/Dockerfile.i586-unknown-linux-musl
index ade3dd4..28c17e7 100644
--- a/docker/Dockerfile.i586-unknown-linux-musl
+++ b/docker/Dockerfile.i586-unknown-linux-musl
@@ -13,18 +13,7 @@ RUN /xargo.sh
 COPY musl.sh /
 RUN /musl.sh TARGET=i586-linux-musl
 
-COPY qemu.sh /
-RUN /qemu.sh i386
-
-ENV CROSS_MUSL_SYSROOT=/usr/local/i586-linux-musl
-COPY musl-symlink.sh /
-RUN /musl-symlink.sh $CROSS_MUSL_SYSROOT i386
-
-COPY qemu-runner /
-
 ENV CARGO_TARGET_I586_UNKNOWN_LINUX_MUSL_LINKER=i586-linux-musl-gcc \
-    CARGO_TARGET_I586_UNKNOWN_LINUX_MUSL_RUNNER="/qemu-runner i586" \
     CC_i586_unknown_linux_musl=i586-linux-musl-gcc \
     CXX_i586_unknown_linux_musl=i586-linux-musl-g++ \
-    BINDGEN_EXTRA_CLANG_ARGS_i586_unknown_linux_musl="--sysroot=$CROSS_MUSL_SYSROOT" \
-    QEMU_LD_PREFIX=$CROSS_MUSL_SYSROOT
+    BINDGEN_EXTRA_CLANG_ARGS_i586_unknown_linux_musl="--sysroot=/usr/local/i586-linux-musl"
diff --git a/docker/Dockerfile.i686-unknown-linux-musl b/docker/Dockerfile.i686-unknown-linux-musl
index 05821df..6b9687f 100644
--- a/docker/Dockerfile.i686-unknown-linux-musl
+++ b/docker/Dockerfile.i686-unknown-linux-musl
@@ -13,18 +13,7 @@ RUN /xargo.sh
 COPY musl.sh /
 RUN /musl.sh TARGET=i686-linux-musl
 
-COPY qemu.sh /
-RUN /qemu.sh i386
-
-ENV CROSS_MUSL_SYSROOT=/usr/local/i686-linux-musl
-COPY musl-symlink.sh /
-RUN /musl-symlink.sh $CROSS_MUSL_SYSROOT i386
-
-COPY qemu-runner /
-
 ENV CARGO_TARGET_I686_UNKNOWN_LINUX_MUSL_LINKER=i686-linux-musl-gcc \
-    CARGO_TARGET_I686_UNKNOWN_LINUX_MUSL_RUNNER="/qemu-runner i686" \
     CC_i686_unknown_linux_musl=i686-linux-musl-gcc \
     CXX_i686_unknown_linux_musl=i686-linux-musl-g++ \
-    BINDGEN_EXTRA_CLANG_ARGS_i686_unknown_linux_musl="--sysroot=$CROSS_MUSL_SYSROOT" \
-    QEMU_LD_PREFIX=$CROSS_MUSL_SYSROOT
+    BINDGEN_EXTRA_CLANG_ARGS_i686_unknown_linux_musl="--sysroot=/usr/local/i686-linux-musl"
diff --git a/docker/Dockerfile.mips-unknown-linux-musl b/docker/Dockerfile.mips-unknown-linux-musl
index 4ba1984..90731a9 100644
--- a/docker/Dockerfile.mips-unknown-linux-musl
+++ b/docker/Dockerfile.mips-unknown-linux-musl
@@ -18,16 +18,15 @@ RUN /musl.sh \
     TARGET=mips-linux-muslsf \
     "COMMON_CONFIG += -with-arch=mips32r2"
 
-ENV CROSS_MUSL_SYSROOT=/usr/local/mips-linux-muslsf
-COPY musl-symlink.sh /
-RUN /musl-symlink.sh $CROSS_MUSL_SYSROOT mips-sf
-
-COPY qemu-runner /
+# Allows qemu run dynamic linked binaries
+RUN ln -sf \
+    /usr/local/mips-linux-muslsf/lib/libc.so \
+    /usr/local/mips-linux-muslsf/lib/ld-musl-mips-sf.so.1
 
 ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_LINKER=mips-linux-muslsf-gcc \
-    CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_RUNNER="/qemu-runner mips" \
+    CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_RUNNER=qemu-mips \
     CC_mips_unknown_linux_musl=mips-linux-muslsf-gcc \
     CXX_mips_unknown_linux_musl=mips-linux-muslsf-g++ \
-    BINDGEN_EXTRA_CLANG_ARGS_mips_unknown_linux_musl="--sysroot=$CROSS_MUSL_SYSROOT" \
-    QEMU_LD_PREFIX=$CROSS_MUSL_SYSROOT \
+    BINDGEN_EXTRA_CLANG_ARGS_mips_unknown_linux_musl="--sysroot=/usr/local/mips-linux-muslsf" \
+    QEMU_LD_PREFIX=/usr/local/mips-linux-muslsf \
     RUST_TEST_THREADS=1
diff --git a/docker/Dockerfile.mips64-unknown-linux-gnuabi64 b/docker/Dockerfile.mips64-unknown-linux-gnuabi64
index 4b95382..3e49f7a 100644
--- a/docker/Dockerfile.mips64-unknown-linux-gnuabi64
+++ b/docker/Dockerfile.mips64-unknown-linux-gnuabi64
@@ -16,10 +16,8 @@ RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
     libc6-dev-mips64-cross && \
     /qemu.sh mips64
 
-COPY qemu-runner /
-
 ENV CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_LINKER=mips64-linux-gnuabi64-gcc \
-    CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_RUNNER="/qemu-runner mips64" \
+    CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_RUNNER=qemu-mips64 \
     CC_mips64_unknown_linux_gnuabi64=mips64-linux-gnuabi64-gcc \
     CXX_mips64_unknown_linux_gnuabi64=mips64-linux-gnuabi64-g++ \
     BINDGEN_EXTRA_CLANG_ARGS_mips64_unknown_linux_gnuabi64="--sysroot=/usr/mips64-linux-gnuabi64" \
diff --git a/docker/Dockerfile.mips64-unknown-linux-muslabi64 b/docker/Dockerfile.mips64-unknown-linux-muslabi64
index 76f0c20..c2037dc 100644
--- a/docker/Dockerfile.mips64-unknown-linux-muslabi64
+++ b/docker/Dockerfile.mips64-unknown-linux-muslabi64
@@ -17,16 +17,15 @@ RUN /musl.sh \
     TARGET=mips64-linux-muslsf \
     "COMMON_CONFIG += -with-arch=mips64r2"
 
-ENV CROSS_MUSL_SYSROOT=/usr/local/mips64-linux-muslsf
-COPY musl-symlink.sh /
-RUN /musl-symlink.sh $CROSS_MUSL_SYSROOT mips64-sf
-
-COPY qemu-runner /
+# This allows qemu run dynamic linked binaries
+RUN ln -sf \
+    /usr/local/mips64-linux-muslsf/lib/libc.so \
+    /usr/local/mips64-linux-muslsf/lib/ld-musl-mips64-sf.so.1
 
 ENV CARGO_TARGET_MIPS64_UNKNOWN_LINUX_MUSLABI64_LINKER=mips64-linux-muslsf-gcc \
-    CARGO_TARGET_MIPS64_UNKNOWN_LINUX_MUSLABI64_RUNNER="/qemu-runner mips64" \
+    CARGO_TARGET_MIPS64_UNKNOWN_LINUX_MUSLABI64_RUNNER=qemu-mips64 \
     CC_mips64_unknown_linux_muslabi64=mips64-linux-muslsf-gcc \
     CXX_mips64_unknown_linux_muslabi64=mips64-linux-muslsf-g++ \
-    BINDGEN_EXTRA_CLANG_ARGS_mips64_unknown_linux_muslabi64="--sysroot=$CROSS_MUSL_SYSROOT" \
-    QEMU_LD_PREFIX=$CROSS_MUSL_SYSROOT \
+    BINDGEN_EXTRA_CLANG_ARGS_mips64_unknown_linux_muslabi64="--sysroot=/usr/local/mips64-linux-muslsf" \
+    QEMU_LD_PREFIX=/usr/local/mips64-linux-muslsf \
     RUST_TEST_THREADS=1
diff --git a/docker/Dockerfile.mips64el-unknown-linux-muslabi64 b/docker/Dockerfile.mips64el-unknown-linux-muslabi64
index a65d9f3..20edf55 100644
--- a/docker/Dockerfile.mips64el-unknown-linux-muslabi64
+++ b/docker/Dockerfile.mips64el-unknown-linux-muslabi64
@@ -17,16 +17,15 @@ RUN /musl.sh \
     TARGET=mips64el-linux-muslsf \
     "COMMON_CONFIG += -with-arch=mips64"
 
-ENV CROSS_MUSL_SYSROOT=/usr/local/mips64el-linux-muslsf
-COPY musl-symlink.sh /
-RUN /musl-symlink.sh $CROSS_MUSL_SYSROOT mips64el-sf
-
-COPY qemu-runner /
+# This allows qemu run dynamic linked binaries
+RUN ln -sf \
+    /usr/local/mips64el-linux-muslsf/lib/libc.so \
+    /usr/local/mips64el-linux-muslsf/lib/ld-musl-mips64el-sf.so.1
 
 ENV CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_MUSLABI64_LINKER=mips64el-linux-muslsf-gcc \
-    CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_MUSLABI64_RUNNER="/qemu-runner mips64el" \
+    CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_MUSLABI64_RUNNER=qemu-mips64el \
     CC_mips64el_unknown_linux_muslabi64=mips64el-linux-muslsf-gcc \
     CXX_mips64el_unknown_linux_muslabi64=mips64el-linux-muslsf-g++ \
-    BINDGEN_EXTRA_CLANG_ARGS_mips64el_unknown_linux_muslabi64="--sysroot=$CROSS_MUSL_SYSROOT" \
-    QEMU_LD_PREFIX=$CROSS_MUSL_SYSROOT \
+    BINDGEN_EXTRA_CLANG_ARGS_mips64el_unknown_linux_muslabi64="--sysroot=/usr/local/mips64el-linux-muslsf" \
+    QEMU_LD_PREFIX=/usr/local/mips64el-linux-muslsf \
     RUST_TEST_THREADS=1
diff --git a/docker/Dockerfile.mipsel-unknown-linux-musl b/docker/Dockerfile.mipsel-unknown-linux-musl
index 8646762..fa2ecc7 100644
--- a/docker/Dockerfile.mipsel-unknown-linux-musl
+++ b/docker/Dockerfile.mipsel-unknown-linux-musl
@@ -18,16 +18,15 @@ RUN /musl.sh \
     TARGET=mipsel-linux-muslsf \
     "COMMON_CONFIG += -with-arch=mips32"
 
-ENV CROSS_MUSL_SYSROOT=/usr/local/mipsel-linux-muslsf
-COPY musl-symlink.sh /
-RUN /musl-symlink.sh $CROSS_MUSL_SYSROOT mipsel-sf
-
-COPY qemu-runner /
+# This allows qemu run dynamic linked binaries
+RUN ln -sf \
+    /usr/local/mipsel-linux-muslsf/lib/libc.so \
+    /usr/local/mipsel-linux-muslsf/lib/ld-musl-mipsel-sf.so.1
 
 ENV CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_LINKER=mipsel-linux-muslsf-gcc \
-    CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_RUNNER="/qemu-runner mipsel" \
+    CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_RUNNER=qemu-mipsel \
     CC_mipsel_unknown_linux_musl=mipsel-linux-muslsf-gcc \
     CXX_mipsel_unknown_linux_musl=mipsel-linux-muslsf-g++ \
-    BINDGEN_EXTRA_CLANG_ARGS_mipsel_unknown_linux_musl="--sysroot=$CROSS_MUSL_SYSROOT" \
-    QEMU_LD_PREFIX=$CROSS_MUSL_SYSROOT \
+    BINDGEN_EXTRA_CLANG_ARGS_mipsel_unknown_linux_musl="--sysroot=/usr/local/mipsel-linux-muslsf" \
+    QEMU_LD_PREFIX=/usr/local/mipsel-linux-muslsf \
     RUST_TEST_THREADS=1
diff --git a/docker/Dockerfile.x86_64-unknown-linux-musl b/docker/Dockerfile.x86_64-unknown-linux-musl
index 1e99b62..3bf262f 100644
--- a/docker/Dockerfile.x86_64-unknown-linux-musl
+++ b/docker/Dockerfile.x86_64-unknown-linux-musl
@@ -13,18 +13,7 @@ RUN /xargo.sh
 COPY musl.sh /
 RUN /musl.sh TARGET=x86_64-linux-musl
 
-COPY qemu.sh /
-RUN /qemu.sh x86_64
-
-ENV CROSS_MUSL_SYSROOT=/usr/local/x86_64-linux-musl
-COPY musl-symlink.sh /
-RUN /musl-symlink.sh $CROSS_MUSL_SYSROOT x86_64
-
-COPY qemu-runner /
-
 ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=x86_64-linux-musl-gcc \
-    CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUNNER="/qemu-runner x86_64" \
     CC_x86_64_unknown_linux_musl=x86_64-linux-musl-gcc \
     CXX_x86_64_unknown_linux_musl=x86_64-linux-musl-g++ \
-    BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_musl="--sysroot=$CROSS_MUSL_SYSROOT" \
-    QEMU_LD_PREFIX=$CROSS_MUSL_SYSROOT
+    BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_musl="--sysroot=/usr/local/x86_64-linux-musl"
diff --git a/docker/aarch64-linux-musl-gcc.sh b/docker/aarch64-linux-musl-gcc.sh
index 8cfe320..6d0aa1e 100755
--- a/docker/aarch64-linux-musl-gcc.sh
+++ b/docker/aarch64-linux-musl-gcc.sh
@@ -4,7 +4,6 @@
 # which affects toolchains older than 1.48
 # older toolchains require the `-lgcc` linker flag otherwise they fail to link
 
-set -x
 set -euo pipefail
 
 main() {
diff --git a/docker/musl-symlink.sh b/docker/musl-symlink.sh
deleted file mode 100755
index a02dd7a..0000000
--- a/docker/musl-symlink.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env bash
-# Create necessary symlinks for musl images to run
-# dynamically-linked binaries.
-# Just to be careful, we need this in a few locations,
-# relative to the musl sysroot.
-#   /lib/ld-musl-armhf.so
-#   /lib/ld-musl-armhf.so.1
-#   /usr/lib/ld.so
-#   /usr/lib/ld.so.1
-#   /usr/lib/libc.so
-#   /usr/lib/libc.so.1
-
-set -x
-set -euo pipefail
-
-main() {
-    local sysroot="${1}"
-    local arch="${2}"
-    local src
-    local dst
-    local dsts
-
-    # ignore any failures here
-    local ld_arch="${arch//_/-}"
-    mkdir -p "$sysroot/usr/lib"
-    src="$sysroot/lib/libc.so"
-    dsts=(
-        "/lib/ld-musl-${arch}.so"
-        "/lib/ld-musl-${arch}.so.1"
-        "$sysroot/lib/ld-musl-${arch}.so"
-        "$sysroot/lib/ld-musl-${arch}.so.1"
-        "$sysroot/usr/lib/ld.so"
-        "$sysroot/usr/lib/ld.so.1"
-        "$sysroot/usr/lib/libc.so"
-        "$sysroot/usr/lib/libc.so.1"
-        # this specifically is a workaround for ARM64, which
-        # for some reason links to `ld-linux-aarch64.so`, but
-        # it is a valid musl binary. trying to use `libc6-dev:arm64`
-        # shows it has an invalid ELF header.
-        "$sysroot/lib/ld-linux-${ld_arch}.so"
-        "$sysroot/lib/ld-linux-${ld_arch}.so.1"
-    )
-    for dst in "${dsts[@]}"; do
-        # force a link if the dst does not exist or is broken
-        if [[ -L "${dst}" ]] && [[ ! -a "${dst}" ]]; then
-            ln -sf "${src}" "${dst}"
-        elif [[ ! -f "${dst}" ]]; then
-            ln -s "${src}" "${dst}"
-        fi
-    done
-
-    echo "${sysroot}/lib" >> "/etc/ld-musl-${arch}.path"
-
-    rm -rf "${0}"
-}
-
-main "${@}"
diff --git a/docker/qemu-runner b/docker/qemu-runner
deleted file mode 100755
index dd89705..0000000
--- a/docker/qemu-runner
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env bash
-# A very lightweight version of linux-runner that
-# doesn't support system emulation. Just useful
-# to allow native or qemu-user mode emulation.
-
-set -e
-
-if [ -n "${CROSS_DEBUG}" ]; then
-    set -x
-fi
-
-# arch in the rust target
-arch="${1}"
-shift
-
-if [ "${CROSS_RUNNER}" = "" ]; then
-    if [[ "${arch}" == i?86 ]] || [[ "${arch}" == x86_64 ]]; then
-        CROSS_RUNNER=native
-    else
-        CROSS_RUNNER=qemu-user
-    fi
-fi
-
-# select qemu arch
-qarch="${arch}"
-case "${arch}" in
-    armv7)
-        qarch="arm"
-        ;;
-    i?86)
-        qarch="i386"
-        ;;
-    powerpc)
-        qarch="ppc"
-        ;;
-    powerpc64)
-        qarch="ppc64"
-        ;;
-    powerpc64le)
-        if [ "${CROSS_RUNNER}" = "qemu-user" ]; then
-            qarch="ppc64le"
-        else
-            qarch="ppc64"
-        fi
-        ;;
-esac
-
-case "${CROSS_RUNNER}" in
-    native)
-        exec "${@}"
-        ;;
-    qemu-user)
-        exec "qemu-${qarch}" "${@}"
-        ;;
-    *)
-        echo "Invalid runner: \"${CROSS_RUNNER}\"";
-        echo "Valid runners are: native and qemu-user"
-        exit 1
-        ;;
-esac
diff --git a/src/lib.rs b/src/lib.rs
index e7999df..038d674 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -360,24 +360,6 @@ impl Serialize for Target {
     }
 }
 
-fn warn_on_failure(target: &Target, toolchain: &str, msg_info: MessageInfo) -> Result<()> {
-    let rust_std = format!("rust-std-{target}");
-    if target.is_builtin() {
-        let component = rustup::check_component(&rust_std, toolchain, msg_info)?;
-        if component.is_not_available() {
-            shell::warn(format!("rust-std is not available for {target}"), msg_info)?;
-            shell::note(
-                format_args!(
-                    r#"you may need to build components for the target via `-Z build-std=<components>` or in your cross configuration specify `target.{target}.build-std`
-              the available components are core, std, alloc, and proc_macro"#
-                ),
-                msg_info,
-            )?;
-        }
-    }
-    Ok(())
-}
-
 pub fn run() -> Result<ExitStatus> {
     let target_list = rustc::target_list(Verbosity::Quiet.into())?;
     let args = cli::parse(&target_list)?;
@@ -542,9 +524,6 @@ pub fn run() -> Result<ExitStatus> {
                     .subcommand
                     .map(|sc| sc.needs_host(is_remote))
                     .unwrap_or(false);
-                if !status.success() {
-                    warn_on_failure(&target, &toolchain, args.msg_info)?;
-                }
                 if !(status.success() && needs_host) {
                     return Ok(status);
                 }
diff --git a/src/rustup.rs b/src/rustup.rs
index 4872eb8..5825bb9 100644
--- a/src/rustup.rs
+++ b/src/rustup.rs
@@ -120,52 +120,16 @@ pub fn install_component(component: &str, toolchain: &str, msg_info: MessageInfo
         .wrap_err_with(|| format!("couldn't install the `{component}` component"))
 }
 
-pub enum Component<'a> {
-    Installed(&'a str),
-    Available(&'a str),
-    NotAvailable(&'a str),
-}
-
-impl<'a> Component<'a> {
-    pub fn is_installed(&'a self) -> bool {
-        matches!(self, Component::Installed(_))
-    }
-
-    pub fn is_not_available(&'a self) -> bool {
-        matches!(self, Component::NotAvailable(_))
-    }
-}
-
-pub fn check_component<'a>(
-    component: &'a str,
+pub fn component_is_installed(
+    component: &str,
     toolchain: &str,
     msg_info: MessageInfo,
-) -> Result<Component<'a>> {
+) -> Result<bool> {
     Ok(Command::new("rustup")
         .args(&["component", "list", "--toolchain", toolchain])
         .run_and_get_stdout(msg_info)?
         .lines()
-        .find_map(|line| {
-            let available = line.starts_with(component);
-            let installed = line.contains("installed");
-            match available {
-                true => Some(installed),
-                false => None,
-            }
-        })
-        .map(|installed| match installed {
-            true => Component::Installed(component),
-            false => Component::Available(component),
-        })
-        .unwrap_or_else(|| Component::NotAvailable(component)))
-}
-
-pub fn component_is_installed(
-    component: &str,
-    toolchain: &str,
-    msg_info: MessageInfo,
-) -> Result<bool> {
-    Ok(check_component(component, toolchain, msg_info)?.is_installed())
+        .any(|l| l.starts_with(component) && l.contains("installed")))
 }
 
 fn rustc_channel(version: &Version) -> Result<Channel> {


Test patch:
diff --git a/src/tests/toml.rs b/src/tests/toml.rs
index 4501755..e8cd68f 100644
--- a/src/tests/toml.rs
+++ b/src/tests/toml.rs
@@ -3,8 +3,10 @@ use std::io::Read;
 use once_cell::sync::Lazy;
 use regex::{Regex, RegexBuilder};
 
+use crate::ToUtf8;
+
 static TOML_REGEX: Lazy<Regex> = Lazy::new(|| {
-    RegexBuilder::new(r#"```toml\n(.*?)```"#)
+    RegexBuilder::new(r#"```toml(.*?)\n(.*?)```"#)
         .multi_line(true)
         .dot_matches_new_line(true)
         .build()
@@ -35,16 +37,40 @@ fn toml_check() -> Result<(), Box<dyn std::error::Error>> {
         let mut contents = String::new();
         file.read_to_string(&mut contents).unwrap();
         for matches in TOML_REGEX.captures_iter(&contents) {
-            let fence = matches.get(1).unwrap();
+            let cargo = {
+                let t = matches.get(1).unwrap().as_str();
+                if t.is_empty() {
+                    false
+                } else if t == ",cargo" {
+                    true
+                } else {
+                    println!("skipping {t}");
+                    continue;
+                }
+            };
+            let fence = matches.get(2).unwrap();
+            let fence_content = fence
+                .as_str()
+                .replace("$TARGET", "x86_64-unknown-linux-gnu")
+                .replace("${target}", "x86_64-unknown-linux-gnu");
+
             eprintln!(
-                "testing snippet at: {:?}:{:?}",
-                dir_entry.path(),
+                "testing snippet at: {}:{:?}",
+                dir_entry.path().to_utf8()?,
                 text_line_no(&contents, fence.range().start),
             );
-            assert!(crate::cross_toml::CrossToml::parse_from_cross(
-                fence.as_str(),
-                crate::shell::MessageInfo::default()
-            )?
+            assert!(if !cargo {
+                crate::cross_toml::CrossToml::parse_from_cross(
+                    &fence_content,
+                    crate::shell::MessageInfo::default(),
+                )?
+            } else {
+                crate::cross_toml::CrossToml::parse_from_cargo(
+                    &fence_content,
+                    crate::shell::MessageInfo::default(),
+                )?
+                .unwrap_or_default()
+            }
             .1
             .is_empty());
         }