{"id":4041,"date":"2022-09-04T09:48:54","date_gmt":"2022-09-04T14:48:54","guid":{"rendered":"https:\/\/www.becomebetterprogrammer.com\/?p=4041"},"modified":"2022-09-04T09:53:16","modified_gmt":"2022-09-04T14:53:16","slug":"solved-rust-error-toolchain-nightly-x86_64-pc-windows-msvc","status":"publish","type":"post","link":"https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/solved-rust-error-toolchain-nightly-x86_64-pc-windows-msvc\/","title":{"rendered":"(Solved) error: toolchain &#8216;nightly-x86_64-pc-windows-msvc&#8217;"},"content":{"rendered":"\n<p>Have you ever cloned a Rust project on your local machine, installed all its dependencies, and attempted to compile it but you came across the error <code>error: toolchain 'nightly-x86_64-pc-windows-msvc' is not installed<\/code>. No worries, here is how you can fix this error.<\/p>\n\n\n\n<p><strong>To fix the error <code>error: toolchain 'nightly-x86_64-pc-windows-msvc' is not installed<\/code> , make sure to run <code>rustup toolchain install nightly<\/code> to install <code>nightly-x86_64-pc-windows-msvc<\/code>.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>rustup toolchain install nightly<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Explanation: What are release channels?<\/h2>\n\n\n\n<p>Rust has three different release channels:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Nightly<\/li><li>Beta<\/li><li>Stable<\/li><\/ul>\n\n\n\n<p>Think about release channels as the different versions that Rust has available. Typically, most Rust developers use the stable release. However, those who want to experiment with the latest Rust features can install the nightly or beta Rust channels.<\/p>\n\n\n\n<p>As the name suggest, the nightly channel is the Rust version produced every night. Which means, every time someone from the Rust team merges new code changes to the master branch on any given day, the nightly version will contain those set of changes, regardless if there could be bugs when introducing new features that are not fully tested.<\/p>\n\n\n\n<p>Hence, if you are using nightly versions of Rust to use experimental features, don&#8217;t be surprised if your Rust code stops working the next day as there is high chance the code base could change for those experimental features.<\/p>\n\n\n\n<p> In the case of the error <code>error: toolchain 'nightly-x86_64-pc-windows-msvc' is not installed<\/code> , it is telling you that a specific toolchain is not installed. To validate this, <strong>you can check the toolchain list installed in your machine using the following command<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>rustup toolchain list<\/code><\/pre>\n\n\n\n<p>For example, prior to running across the error <code>error: toolchain 'nightly-x86_64-pc-windows-msvc' is not installed<\/code>, I had the following list of toolchains installed in my windows machine:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"387\" height=\"56\" src=\"https:\/\/www.becomebetterprogrammer.com\/wp-content\/uploads\/2022\/09\/image.png\" alt=\"\" class=\"wp-image-4043\" srcset=\"https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-content\/uploads\/2022\/09\/image.png 387w, https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-content\/uploads\/2022\/09\/image-300x43.png 300w\" sizes=\"auto, (max-width: 387px) 100vw, 387px\" \/><figcaption>List of toolchains installed when getting the error <code>error: toolchain 'nightly-x86_64-pc-windows-msvc' is not installed<\/code><\/figcaption><\/figure>\n<\/div>\n\n\n<p>After I ran <code>rustup toolchain install nightly<\/code> to install the nightly channel, the toolchain list is now:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"309\" height=\"79\" src=\"https:\/\/www.becomebetterprogrammer.com\/wp-content\/uploads\/2022\/09\/image-1.png\" alt=\"\" class=\"wp-image-4044\" srcset=\"https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-content\/uploads\/2022\/09\/image-1.png 309w, https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-content\/uploads\/2022\/09\/image-1-300x77.png 300w, https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-content\/uploads\/2022\/09\/image-1-306x79.png 306w\" sizes=\"auto, (max-width: 309px) 100vw, 309px\" \/><figcaption>Updated toolchain list after installing nightly version<\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Updating the default toolchain<\/h2>\n\n\n\n<p>Notice, that there is a &#8220;(default)&#8221; tag on a specific toolchain. In my case, I want to a stable toolchain as the default option. However, in the case I need to use the nightly version on a regular basis, I could switch to the default toolchain using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>rustup default nightly<\/code><\/pre>\n\n\n\n<p>or <\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>rustup default nightly-x86_64-pc-windows-msvc<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever cloned a Rust project on your local machine, installed all its dependencies, and attempted to compile it but you came across the error error: toolchain &#8216;nightly-x86_64-pc-windows-msvc&#8217; is not installed. No worries, here is how you can fix this error. To fix the error error: toolchain &#8216;nightly-x86_64-pc-windows-msvc&#8217; is not installed , make sure &#8230; <a title=\"(Solved) error: toolchain &#8216;nightly-x86_64-pc-windows-msvc&#8217;\" class=\"read-more\" href=\"https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/solved-rust-error-toolchain-nightly-x86_64-pc-windows-msvc\/\" aria-label=\"More on (Solved) error: toolchain &#8216;nightly-x86_64-pc-windows-msvc&#8217;\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":4049,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[31],"tags":[],"class_list":["post-4041","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-rust","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-json\/wp\/v2\/posts\/4041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-json\/wp\/v2\/comments?post=4041"}],"version-history":[{"count":5,"href":"https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-json\/wp\/v2\/posts\/4041\/revisions"}],"predecessor-version":[{"id":4048,"href":"https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-json\/wp\/v2\/posts\/4041\/revisions\/4048"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-json\/wp\/v2\/media\/4049"}],"wp:attachment":[{"href":"https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-json\/wp\/v2\/media?parent=4041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-json\/wp\/v2\/categories?post=4041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.becomebetterprogrammer.com\/staging\/4563\/wp-json\/wp\/v2\/tags?post=4041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}