From 2dd8bc808cf256e2de188190277ef016f2a25467 Mon Sep 17 00:00:00 2001 From: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> Date: Wed, 4 Jun 2025 14:43:04 -0700 Subject: [PATCH] Automatically install guest cross-compilation target if not installed Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> --- README.md | 7 ------- rust-toolchain.toml | 3 +++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e88bb3f19..7bfc7102e 100644 --- a/README.md +++ b/README.md @@ -173,13 +173,6 @@ After having an environment with a hypervisor setup, running the example has the 1. On Linux or WSL, you'll most likely need build essential. For Ubuntu, run `sudo apt install build-essential`. For Azure Linux, run `sudo dnf install build-essential`. 2. [Rust](https://www.rust-lang.org/tools/install). Install toolchain v1.85 or later. - - Also, install the `x86_64-unknown-none` target, it is needed to build the test - guest binaries. - ```sh - rustup target add x86_64-unknown-none - ``` - 3. [just](https://github.com/casey/just). `cargo install just` On Windows you also need [pwsh](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4). 4. [clang and LLVM](https://clang.llvm.org/get_started.html). - On Ubuntu, run: diff --git a/rust-toolchain.toml b/rust-toolchain.toml index c5794a6b8..779844372 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,5 @@ [toolchain] channel = "1.85" +# Target used for guest binaries. This is an additive list of targets in addition to host platform. +# Will install the target if not already installed when building guest binaries. +targets = ["x86_64-unknown-none"] \ No newline at end of file