Emacs, scripting and anything text oriented.

Installing rust toolchain

Kaushal Modi

Lately, I have come to know of a command line search utility called ripgrep, coded in rust, that is capable of faster code searches (at least for my use cases) than grep or ag. So I got interested in building the latest versions of rg (ripgrep binary name) directly from its github master branch rather than waiting for its release binaries.

So came the need to install the rust toolchain on my machine. Luckily, installing that was super easy; here are the steps:

  1. Navigate to https://www.rustup.rs in your web browser.

    • Based on your OS, it will provide you the install instructions. For RHEL 6.6, it asked me to run this curl command1:

      curl https://sh.rustup.rs -sSf | sh
  2. Once I ran that command, I was faced with the below prompt:

    Outcome of running the curl .. | sh command

    Everything looked good, except that I did not want the script to modify the PATH variable for me. So I went with the 2) Customize .. option and disabled that. The main thing to make note of was that all the binaries would be installed in ~/.cargo/bin.

  3. So after running the above, I updated the PATH to include ~/.cargo/bin in my shell config.

That’s it! You can then verify the installation by doing a version check.

rustc --version

You can learn more about rustup from this README.md.

  1. Normally I wouldn’t run a stray curl .. | sh command, but I made an exception for this one. [return]

If you have written a response to this, enter your response post's URL below.

Or, you can send a "comment" webmention (it's OK if you don't know what that means). When asked about your website on an IndieAuth login screen, simply type https://commentpara.de.

Markdown Support**bold**, _italics_, ~~strikethrough~~, [descr](link), `monospace`, ```LANG\nline1\nline2\n``` (Yep, multi-line code blocks too, with syntax highlighting!), auto-hyperlinking.

Webmentions #