From 646e5ba5023fdc5d54a9940953f17013f351217f Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sun, 30 Apr 2023 16:53:45 +0200 Subject: [PATCH] Add a short introduction to rustup --- .../posts/01-minimal-kernel/index.md | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/blog/content/edition-3/posts/01-minimal-kernel/index.md b/blog/content/edition-3/posts/01-minimal-kernel/index.md index a3df1e9e..4b046385 100644 --- a/blog/content/edition-3/posts/01-minimal-kernel/index.md +++ b/blog/content/edition-3/posts/01-minimal-kernel/index.md @@ -314,10 +314,26 @@ For example, the `thumbv7em-none-eabihf` target triple can be used to compile fo Our kernel should run on a bare-metal `x86_64` system, so the suitable target triple is [`x86_64-unknown-none`]. The `-none` suffix indicates that there is no underlying operating system. -To be able to compile for this target, we need to add it using [`rustup`]: +To be able to compile for this target, we need to add it using [`rustup`]. [`x86_64-unknown-none`]: https://doc.rust-lang.org/rustc/platform-support/x86_64-unknown-none.html -[`rustup`]: https://doc.rust-lang.org/rustc/platform-support/x86_64-unknown-none.html + +
+What is rustup? + +The [`rustup`] tool is the [officially recommended] way of installing Rust. +It supports having multiple versions of Rust installed simultaneously and makes upgrading Rust easy. +It also provides access to optional tools and components such as [`rustfmt`] or [`rust-analyzer`]. +This guide requires `rustup`, so please install it if you haven't already. + +[`rustup`]: https://rustup.rs/ +[officially recommended]: https://www.rust-lang.org/learn/get-started +[`rustfmt`]: https://github.com/rust-lang/rustfmt/ +[`rust-analyzer`]: https://github.com/rust-lang/rust-analyzer + +
+ +To download and set up the `x86_64-unknown-none` target, we use the following `rustup` command: ``` rustup target add x86_64-unknown-none