Advanced deserialization with Serde: Parsing Cloudformation templates
serde is a great library for Rust that allows you to serialize and deserialize your structs efficiently. In this article, we will review some advanced features of this library by parsing AWS Cloudformation templates.
Cloudformation is an infrastructure as a code. It allows you to model your AWS resources inside the template. After that, AWS will provision all the resources in the correct order for you. It’s a powerful tool that is very popular nowadays....
Cross-platform Brainfuck Interpreter implementation in Rust - Part 2
This article is the next part of Brainfuck interpreter implementation. We built the library that parses and executes Brainfuck language in the previous part. In this part, we will use this library in the CLI program and deploy the code to AWS Lambda. Let’s begin with the CLI.
CLI program implementaiton Firstly, we need to create a new application in our workspace. In the terminal, go to the root workspace directory and run this command:...
Cross-platform Brainfuck Interpreter implementation in Rust - Part 1
Brainfuck is a highly minimalistic programming language created in 1993 by Swiss physics student Urban Müller. The language consists of only eight simple commands, a data pointer and an instruction pointer. In this article, we will implement a custom Brainfuck interpreter in Rust.
Workspace setup Let’s create a workspace for our project:
Create a folder with your workspace name. For example: brainfuck. Add file Cargo.toml with this content: [workspace] members = [ ] Create a brainfuck interpreter library: cargo new --lib brainfuck_interpreter Modify your outer Cargo....
Implementation of CIDR routing table in Rust
Classless Inter-Domain Routing (CIDR) is a method of allocating IP addresses. This method is used in low-level routing and other Computer Science fields, especially in the Cloud. For example, in AWS, you manage a VPC and subnets. They contain a set of IP ranges in the form of CIDR blocks.
As I mentioned earlier, CIDR is used for routing. The main idea of routing is to identify the most exact CIDR block for a given IP address or indicate that such does not exist....
Priority Queue Implementation in Rust
This article will describe a more complex data structure called Priority Queue. We will implement it with a Binary Heap, a data structure that takes the form of a tree.
...