How to use State Design Pattern in Rust

Anything has a state. An entity has a state. Similarly, a car can be in a state of acceleration. While it is accelerating, there are some things it certainly cannot or should not do, e.g., reversing at that very moment. The State Design Pattern treats each state as a struct whose functions represent movements to the other states.

How to Read Input from Console Examples

In Rust, we can read user inputs from the command-line console. These inputs are string values with newline characters at the end. Most of the time, we do not want those extra characters. This post provides three simple example codes

How to use Local Unpublished Crates

At some point in learning Rust, we will encounter the need to create our own crates. They need to go through development and testing before there are published to creates.io. This brief post is about creating and using local unpublished crates.

Pattern Matching for Declarative Macros in Rust

Macros are like functions but only better. They are triggered based on their patterns using pattern matching for declarative Macros. They group together our codes into a unit (or units) and there are 2 types of macros in Rust – declarative and procedural. This brief post is about declarative macros.

Have You Started Using Actix-Web? It May Already Be Dead

Have you started using Actix-Web in your learning of Rust or real projects? Actix-web is now dead and no longer an open-source project. The author has moved it, along with Actix-Net, to his personal GitHub account. He is taking his

10 Alternatives To The Defunct Actix-Web

People have started looking for 10 alternatives to the now-defunct Actix-web since its death. Some may end up forking Actix-web and evolve it into something uniquely theirs. Others may have started porting their applications to other frameworks or even out of Rust.

Actix-Web: The Most Fun Rust Web Framework Is Back!

The most fun Rust web framework is back with a new project leader! I feel relieved by its comeback. Today, I was trying out one of the alternatives to Actix-web. But I was having difficulties making it read and parse

Install Julia And Run Source Code Files In Windows

This post is about how to install Julia and run source code files in Windows. Once we install it, we need to configure it a bit to make the Julia executable file available in command-line windows. Download And Install Julia

How To Modify Struct Instance In A Function in Rust

This post shows how to modify a struct instance in a function. It uses the mutable shared borrowing to pass a mutable reference as an argument to a function. Struct And Instance Consider the following Person struct. It has two