Rust content

    • Guide to Rust procedural macros

      Procedural macros are a way for you to extend the Rust complier and provide plugins that you can use to extend the language. They allow you to reduce the need to write manual boilerplate code, and even allow you to create your own DSL (domain specific language). This article goes into the details of creating the 3 kinds of procedural macros in Rust.
    • Write a Redux library in Rust

      This article illustrates how we can build a Redux library in Rust. This library is thread safe and asynchronous (using Tokio). The middleware and subscribers will be run in parallel. But the reducer functions will be run in sequence.
    • Write code using async/await in Rust

      This article illustrates how to write concurrent and parallel code in Rust using Tokio. The pedagogical example we will use is building an asynchronous implementation of a middleware runner that you might find in a Redux store.
    • Build a grep CLI app in Rust

      This article illustrates how we can build a CLI app in Rust that is a very basic implementation of grep. This app will have 2 modes of operation: piping lines in from `stdin` and searching them, and reading a file and searching thru it. The output of the program will be lines that match the search term w/ the term being highlighted. Topics like `stdin` manipulation in a terminal, detecting when the terminal is in `tty` mode vs `piped` mode, doing simple file I/O, creating non consuming builders, and managing `Result`s, along w/ building a simple CLI interface are covered in this article.
    • Build a non-binary tree that is thread safe using Rust

      This article illustrates how we can build a non-binary tree in Rust using various approaches until we end up with a version that is thread safe and supports parallel tree walking as well. Topics like interior mutability, sharing ownership, weak and strong references, custom traits for polymorphic behavior, are covered in this article.

    Subscribe to RSS feed