Why should I use Rust?

Standard

With respect to subject of my blog, this might be the questions of all who heard about this programming language or who have attended any rust session/workshops very first time. Recently when I was traveling to some cities in India for Rust campaign called RainOfRust, that time one 2nd year engineering student who attended one of my session asked me this question, “Why should I use Rust?” when my session got over.

Well, this was the best questions so far anyone asked me during this campaign and I loved to shared how I answered that.

You might thought that I have started my conversation with this general definition that,

Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety.

This the common definition which everybody knows. I always believe that you should share your things the way you understand or the you adopt it. This way your thoughts spread better among all who listened to you.

Rust is a good choice when you’d choose C++. You can also say, “Rust is a systems programming language that pursuing the trifecta: safe, concurrent, and fast.” I would say, Rust is an ownership-oriented programming language.

Here is my definition and from here I started to explained him, after sometime some more students joined the conversation and it became more interesting.

Firstly, the reason that I’ve looked into Rust at first.

  • Rust is new enough that you can write useful stuff that would have already existed in other languages
  • It gives a relatively familiar tool to the modern C++ developers, but in the much more consistent and reliable ways.
  • It is low-level enough that you take account of most resources.
  • Its more like C++ and Go, less like Node and Ruby
  • cargo is awesome. Managing crates just works as intended, which makes a whole lot of troubles you may have in other languages just vanish with a satisfying poof.

Continue reading

Installing Rust on Windows

Standard

Installing Rust can be as easy as pulling down an installer and double clicking. For developers working with more complex tools or who need to build unsafe C/C++ libraries from source, there’s a little bit of extra work that needs to be done, but it’s nothing that a savvy person can’t handle.

Throughout this whole process, make sure you keep installing the right version of libraries – Rust is currently 64-bit only for MSVC. You’ll get bizarro errors at various points if you mess up and try to use 32-bit libraries or prereqs with Rust. Trust me.

Again – if all you need is a Rust compiler, jump over to https://www.rust-lang.org/ and click “Install”. If you plan on working with natively compiled C/C++ libraries, then read on! Continue reading