From 7ce9ae1caf4ddf5b41c160e33ca3dafd6b2bf19a Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sun, 30 Apr 2023 16:54:38 +0200 Subject: [PATCH] Remove profile overrides again after compiling for custom target --- blog/content/edition-3/posts/01-minimal-kernel/index.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 4b046385..bf219df7 100644 --- a/blog/content/edition-3/posts/01-minimal-kernel/index.md +++ b/blog/content/edition-3/posts/01-minimal-kernel/index.md @@ -350,7 +350,12 @@ Afterwards, we can [cross compile] our executable for a bare metal environment b error: requires `start` lang_item ``` -We still get the error about a missing `start` language item because we're still depending on the Rust runtime. To remove that dependency, we can use the `#[no_main]` attribute. +We still get the error about a missing `start` language item because the custom target only removed the dependency on the C library. +To remove the dependency on the Rust runtime as well, we can use the `#[no_main]` attribute. + +Before that, we can do a small cleanup. +The `x86_64-unknown-none` target defaults to `panic = "abort"`, so the we can remove the `profile.dev` and `profile.release` tables from our `Cargo.toml` again. + ### The `#[no_main]` Attribute