<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us"><generator uri="https://gohugo.io/" version="0.101.0">Hugo</generator><title type="html">rust on A Scripter's Notes</title><subtitle type="html">Emacs, scripting and anything text oriented.</subtitle><link href="https://scripter.co/categories/rust/" rel="alternate" type="text/html" title="HTML"/><link href="https://scripter.co/categories/rust/index.xml" rel="alternate" type="application/rss+xml" title="RSS"/><link href="https://scripter.co/categories/rust/atom.xml" rel="self" type="application/atom+xml" title="Atom"/><link href="https://scripter.co/categories/rust/jf2feed.json" rel="alternate" type="application/jf2feed+json" title="jf2feed"/><updated>2026-04-22T08:24:57-04:00</updated><author><name>Kaushal Modi</name><email>kaushal.modi@gmail.com</email></author><id>https://scripter.co/categories/rust/</id><entry><title type="html">Installing rust toolchain</title><link href="https://scripter.co/installing-rust-toolchain/?utm_source=atom_feed" rel="alternate" type="text/html"/><id>https://scripter.co/installing-rust-toolchain/</id><published>2017-01-12T10:29:28-05:00</published><updated>2017-01-12T10:29:28-05:00</updated><content type="html"><![CDATA[<p>Lately, I have come to know of a command line search utility called [<code>ripgrep</code>][3], coded in <code>rust</code>, that is capable of faster code searches (at least for my use cases) than <code>grep</code> or [<code>ag</code>][4]. So I got interested in building the latest versions of <code>rg</code> (<em>ripgrep</em> binary name) directly from its github <em>master</em> branch rather than waiting for its [release binaries][5].</p>
<p>So came the need to install the <code>rust</code> toolchain on my machine. Luckily, installing that was super easy; here are the steps:</p>
<ol>
<li>
<p>Navigate to <a href="https://www.rustup.rs">https://www.rustup.rs</a> in your web browser.</p>
<ul>
<li>
<p>Based on your OS, it will provide you the install instructions. For RHEL 6.6, it asked me to run this <code>curl</code> command<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">curl https://sh.rustup.rs -sSf <span class="p">|</span> sh
</span></span></code></pre></div></li>
</ul>
</li>
<li>
<p>Once I ran that command, I was faced with the below prompt:</p>
<p>![Outcome of running the curl .. | sh command][1]</p>
<p>Everything looked good, except that I did not want the script to modify the <code>PATH</code> variable for me. So I went with the <em>2) Customize ..</em> option and disabled that. The main thing to make note of was that all the binaries would be installed in <code>~/.cargo/bin</code>.</p>
</li>
<li>
<p>So after running the above, I updated the <code>PATH</code> to include <code>~/.cargo/bin</code> in my shell config.</p>
</li>
</ol>
<p>That&rsquo;s it! You can then verify the installation by doing a version check.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">rustc --version
</span></span></code></pre></div><hr>
<p>You can learn more about <code>rustup</code> from this [<code>README.md</code>][2].</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p><em>Normally I wouldn&rsquo;t run a stray <code>curl .. | sh</code> command, but I made an exception for this one.</em>
[1]: /images/installing_rust_toolchain__curl_sh.png
[2]: <a href="https://github.com/rust-lang-nursery/rustup.rs/blob/master/README.md">https://github.com/rust-lang-nursery/rustup.rs/blob/master/README.md</a>
[3]: <a href="https://github.com/BurntSushi/ripgrep">https://github.com/BurntSushi/ripgrep</a>
[4]: <a href="https://github.com/ggreer/the_silver_searcher">https://github.com/ggreer/the_silver_searcher</a>
[5]: <a href="https://github.com/BurntSushi/ripgrep/releases">https://github.com/BurntSushi/ripgrep/releases</a>&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>]]></content><category scheme="https://scripter.co/categories/rust" term="rust" label="rust"/></entry></feed>