What is Rust programing language

Rust is a modern, compiled, multi-paradigm systems programming language known for its emphasis on safety, performance, and concurrency. It is often seen as a safer alternative to C and C++ for systems-level development.

Why Rust?

  • Performance: Rust is blazingly fast and memory-efficient: with no runtime or garbage collector, it can power performance-critical services, run on embedded devices, and easily integrate with other languages.
  • Reliability: Rust’s rich type system and ownership model guarantee memory-safety and thread-safety — enabling you to eliminate many classes of bugs at compile-time.
  • Productivity: Rust has great documentation, a friendly compiler with useful error messages, and top-notch tooling — an integrated package manager and build tool, smart multi-editor support with auto-completion and type inspections, an auto-formatter, and more.

Hello world

Let’s jump right into our first example to understand how Rust works.

cargo new hello
cd hello
cargo run
Rust running
Centered image with caption

Below is the folder structure of rust project

$ tree --dirsfirst hello
hello
├── src
│   └── main.rs
├── target
│   └── debug
│       ├── build
│       ├── deps
│       ├── examples
│       ├── native
│       └── hello
├── Cargo.lock
└── Cargo.toml