loading...

Getting started with Rust on Mac

jjmax75 profile image John Behan Originally published at boxitoff.com ・1 min read

Getting started with Rust (3 Part Series)

1) Getting started with Rust on Mac 2) Managing Rust binary files and Git when using rustc 3) Using attributes in Rust to suppress warnings

The Easy WayTM to Install Rust (on a Mac)

The easiest way to install Rust on a Mac is to head on over to https://www.rust-lang.org/tools/install and use the shell command there -

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

But...

Sometimes we get the following error -

Unknown SSL protocol error in connection to static.rust-lang.org

Sometimes. I got this on my work machine but not my personal one.

You can read a bit about this issue here - https://www.wormly.com/answers/sid/142/topicid/19

There is a fairly straightforward solution

The Fairly Easy WayTM to Install Rust (on a Mac)

(See Update below before trying this)

We want to use rustup so let's get that first.

brew install rustup

Next let's setup cargo and rustc,

rustup-init

Finally we can check our installation with - rustc --version

UPDATE

jeikabu on Dev.to has given this tip to try.

The old way of installing rustup - curl sh.rustup.rs -sSf | sh

I haven't tested this but it is worth trying before falling back on brew.

Getting started with Rust (3 Part Series)

1) Getting started with Rust on Mac 2) Managing Rust binary files and Git when using rustc 3) Using attributes in Rust to suppress warnings

Posted on Mar 14 by:

jjmax75 profile

John Behan

@jjmax75

I am a software developer working with Javascript and starting with Rust

Discussion

markdown guide
 

Using brew to run a shell script seems like overkill, can you just use the old command:
curl sh.rustup.rs -sSf | sh

 

Yes, that is definitely the preferred approach and worked on one of my machines.

The second approach is only for when that doesn't work

 

I mean, it's a known potential issue with macOS and client-side certificates, just don't use TLS. No need for brew.

cool, I'll add that to the article, thanks :D