From b8eb8e650698df0832f875a63fb918f6fdba0ddb Mon Sep 17 00:00:00 2001 From: Xithrius Date: Wed, 3 Jan 2024 09:48:53 -0800 Subject: [PATCH] Maximum amount of parallel jobs for Cargo --- site/content/posts/cargo-set-build-jobs.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 site/content/posts/cargo-set-build-jobs.md diff --git a/site/content/posts/cargo-set-build-jobs.md b/site/content/posts/cargo-set-build-jobs.md new file mode 100644 index 0000000..43d2694 --- /dev/null +++ b/site/content/posts/cargo-set-build-jobs.md @@ -0,0 +1,13 @@ +--- +title: "Maximum amount of parallel jobs for Cargo" +date: "2024-01-03" +--- + +Sometimes Cargo makes my CPU cores go to the surface temperature of the sun. To avoid this, set the `build.jobs` integer in `~/.cargo/config.toml` to something below your CPU core count: + +```toml +[build] +jobs = 4 +``` + +Source: https://doc.rust-lang.org/cargo/reference/config.html#buildjobs