Rust

Bleed Less during Runtime with Rust’s Lifetime

Reading Time: 3 minutes “Sweat more in training (Compile Time), Bleed less in Battle (Run-Time)”. I think this old warrior mantra fits best for Rust Programmers. There are few new concepts introduced by rust-like Ownership and Lifetime, which are hard to grasp even for an experienced coder in the beginning. So the question is, why new features? And how it makes Rust different from other languages. Why Rust? One Continue Reading

Diving into Rust’s Ownership

Reading Time: 5 minutes Rust is a powerful systems programming language that empowers developers to build reliable and efficient software by giving them control of low-level details such as memory usage. It is one of the most popular programming languages and StackOverflow’s most loved language for four years in a row. It is a type-safe programming language like C and C++ but different in the way that rust is Continue Reading

Prevent Breaking Code Changes in Future Releases using `non exhaustive` enums in Rust

Reading Time: 2 minutes Hello everyone, recently I have come across a feature in Rust, known as non_exhaustive. It was introduced in Rust 1.40.0 . This attribute prevents source code-breaking changes in projects downstream. enums can be non-exhaustive or exhaustive, depending upon their needs. A non-exhaustive enum indicates that this enum may get new value in the future. By adding #[non_exhaustive] attribute, we can create a non-exhaustive enum which Continue Reading

Wondering how to upgrade your skills in the pandemic? Here’s a simple way you can do it.

Reading Time: 3 minutes Corona Virus Pandemic has brought the world to a standstill. Countries are on a major lockdown. Schools, colleges, theatres, gym, clubs, and all other public places are shut down, the country’s economy is suffering, human health is on stake, people are losing their jobs and nobody knows how worse it can get. Since most of the places are on lockdown, and you are working from Continue Reading

Rust with WebAssembly: Simple explanation with a nice example

Reading Time: 2 minutes Now a days everyone is talking about WebAssembly. In this blog, I will explain how you can get started with Rust and WebAssembly fast with a simple template. But before we start, lets discuss what is webassembly, why Rust should be preferred for it. What is WebAssembly: We can think of webassembly as a type of bytecode that can be generated from any language. That Continue Reading

Rust’s Future: Internal Execution

Reading Time: 4 minutes As you all know Rust Programming has Futures which helps to make our code Asynchronous. Rust’s Futures are analogous to Promises.This article mainly pertains to the internal working of the Future and we’ll also understand the structure of the Future like how it is defined and how it will execute when it comes into the action. Future: In a Nutshell Future is trait in Rust Continue Reading

Custom Implementation of Blockchain In Rust(Part 3)

Reading Time: 2 minutes In previous blogs(part-1 and part-2), we created a sample blockchain application. We also implemented validation and proof of work algorithm. Now we are going to upgrade our blockchain to simple cryptocurrency. We can do this by:- Including the functionality of paying out rewards to miners Signing the transaction We will be covering only first part in this blog. We will cover transaction signature in next Continue Reading

A Quick Rundown of Async/Await in Rust

Reading Time: 4 minutes As you all know the async–await syntax hits stable Rust, as part of the 1.39.0 release. So let’s leverage this stabilized feature to make our code-bases Asynchronous with Zero-cost futures. In this article, we’ll mainly look into the basics of Async/Await feature: Async/Await: Quick Intro Zero-cost futures Quick Demonstration of Asynchronous Programming Before diving into our road-map let’s understand the behavior of the Asynchronous programming. In a Continue Reading

Custom Implementation of Blockchain In Rust(Part 2)

Reading Time: 2 minutes Hello Everyone, in the previous blog, we talked about blockchain, what is block and its content. we also implemented a sample Blockchain application using Rust.In this blog, we will continue working with our sample blockchain application and talk about blockchain validation and its mining process. Blockchain Validation Why do we need blockchain validation? Because we have to ensure that no one can tamper any data Continue Reading