Published in


Rust — Intro and Installation in Ubuntu

Rust is a new age programming language that tries to fight our bad practices in coding. It is a Systems Programming Language, which runs almost as fast as c, and c++.

Rust started off as a side project by Graydon Hoare in 2006, when he was working with Mozilla on Servo (a browser engine). Rust released its version 1.0 on 15 May, 2015, and ever since then it releases a new stable version every six weeks once.

I have faced several hurdles while learning and understanding Rust Language, Hence, I have planned to write a series of stories in medium, documenting the same. If anyone ever finds it useful, am grateful. If not, it will help myself at least, when I need some revision.

Readers, feel free to comment if you’ve any alternative solutions, contrast views or a different problem all together. After all,

to err is human… to unforgive is Rust Compiler 😛

Install rust simply by typing in your terminal the following command:

$ curl https://sh.rustup.rs -sSf | sh

If curl is not available, install the same: $ sudo apt install curl

Rust comes with a project manager — “Cargo”. Start a new project with cargo, in no time: $ cargo new hello_cargo --bin

Rust distinguishes the projects in to 2 types:
1. Executable (Default i.e. the argument --bin is optional)
2. Library (--lib instead of --bin)
Prior to v1.25, Library was default and Executable required the flag --bin.

cd into the new project “hello_cargo” and execute the code: cargo run

If you are facing the following error:linker `cc` not found, which is exactly what I’ve faced, then we are supposed to install any cc — gcc/clang. I preferred gcc to clang, and installed the same:
sudo apt install build-essential

Now, the hello_cargo project will execute perfectly.




Aackam Consultancy Services LLP is a B2B ThinkTank founded to provide End-to-End Business Services

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store



More from Medium

What’s a “Thread Boundary” in Rust’s Async-Await ?

A Beginner’s Guide to Setting up Rust on Windows.

Simple Rust Plugin Template

Release multi-target Rust applications with GitLab CI