From 6d02874049c21758a7e6a9cf10bb05ffd16fb832 Mon Sep 17 00:00:00 2001 From: Mostafa Elbannan <63522515+moomoolive@users.noreply.github.com> Date: Tue, 27 Apr 2021 03:18:38 -0600 Subject: [PATCH] Suggestion for .cargo/config.toml Explanation (#974) I was confused on what the 'unstable' section of my .cargo/config.toml file should look like once I started getting linking errors when going through the third post. It turned out it was because I overwrote the previous 'unstable' configuration with the latter one. In other words, I thought we were to overwrite "build-std = ["core", "compiler_builtins"]" under the "unstable" config, with "build-std-features = ["compiler-builtins-mem"]" and NOT have both present. I think this makes it more clear that both are supposed to be present. --- blog/content/edition-2/posts/02-minimal-rust-kernel/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/blog/content/edition-2/posts/02-minimal-rust-kernel/index.md b/blog/content/edition-2/posts/02-minimal-rust-kernel/index.md index 7567da92..c4cf302c 100644 --- a/blog/content/edition-2/posts/02-minimal-rust-kernel/index.md +++ b/blog/content/edition-2/posts/02-minimal-rust-kernel/index.md @@ -306,6 +306,7 @@ Fortunately, the `compiler_builtins` crate already contains implementations for [unstable] build-std-features = ["compiler-builtins-mem"] +build-std = ["core", "compiler_builtins"] ``` (Support for the `compiler-builtins-mem` feature was only [added very recently](https://github.com/rust-lang/rust/pull/77284), so you need at least Rust nightly `2020-09-30` for it.)