Rust

How We can do Fearless Concurrency in RUST

Handling concurrent programming safely and efficiently is another of Rust’s major goals. Concurrent programming, where different parts of the program execute independently, and parallelly. Creating Thread-In RUST:- In RUST to create a new thread, we call the thread:: spawn function and pass it in a closure containing the code we want to run in the new thread. Example: Filename: src/main.rs use std::thread; use std::time::Duration; fn Continue Reading

RUST – Ownership

One of the very distinctive features that make Rust stand out among the other languages is the way it does memory management. Memory management in C happens by either declaring a variable or by allocating a chunk of space at runtime. The same then can be freed using explicit function calls. So basically the control resides with the developer which may result in error-prone code. Continue Reading

Introduction to Error Handling in RUST

Like most programming languages, Rust encourages the programmer to handle errors in a particular way. If we talk in a general way Rust gives you an acknowledgment about an error and gives you an option to define some action for it before compile. This makes your program more robust by ensuring that you’ll discover errors and handle them appropriately. Rust group errors into two major Continue Reading

Iteration in RUST – Working with Loop, While, For

I hope you have already been through the following blogs in order to learn control flow and iteration in RUST: RUST: Quick Start & Exploring Cargo RUST: Begin the Journey with CODE Basically, RUST is no different compared to other programming languages in the context of loops and iteration, if you have already worked with any language like C, C++, Java, Scala, etc. then it Continue Reading

Working with Rust: Understanding struct, impl, methods and self

While working with any programming language, we always have a requirement of creating custom data types. If you are familiar with any object-oriented language, there are classes that comprise data attributes and some methods to play with their context. The objects of these classes are used for reflecting the behaviors. Like other languages, Rust also provides us with all these flexibilities, but in its own Continue Reading

Rust-Null-Option-None

RUST can never be NULL

You might not know NULL was born more than a half-century ago, and it is still alive to create the mess for us, but not with RUST. Although it was considered to be BOOM for the coders, now it’s becoming a BANE for the programmer. With the emerging languages, creators are avoiding the implementation of NULL now. The inventor of NULL Tony Hoare[2] apologized for inventing it Continue Reading

RUST: Begin the Journey with CODE

Hope so you have already gone through the first blog “RUST: Quick Start & Exploring Cargo” and ready to workout with your fingers and keys. You might be thinking about the basic programming concepts of RUST as a language. With the help of an example, I will try to cover the following points (practically): mutable, immutable variables Standard input/output (console) Functions Data type and conversion Loops: Continue Reading

RUST: Numeric Data Types

You must be wondering what is so special about numeric data types in RUST, that we are focusing on them so much, definitely, you will get to know after finishing this blog. Generally, other programming languages follow short, int, float, long, double etc as numeric data types as per their storage size and capacity while in RUST numeric data type are like : i[size_in_bits] or u[size_in_bits]  Here, i Continue Reading

Working with Rust: Formatting, Linting & Auto-completion

Every language has its own toolset for writing effective and clean code, Rust is no different. So in this blog, we would be describing how to format the rust code, while working with different editors or IDE. Formatting code is a mechanical task which takes both time and mental effort. By using an automatic formatting tool, a programmer is relieved of this task and can Continue Reading

RUST: Quick Start & Exploring Cargo

This blog will guide you through the brief introduction to RUST, installation, uninstallation, version updating and quick start with its own build tool CARGO. RUST – safe, concurrent, and practical language, much similar to C++ (syntactically) supports functional as well as imperative-procedural paradigms. Setting up RUST in your system: For Linux or Mac: It’s quick and easy to install and setup your system for RUST Continue Reading

%d bloggers like this: