Text user interface content

    • Build with Naz : Explore Linux TTY, process, signals w/ Rust

      This article, along with related videos and the repository, explores Linux TTY, shells, processes, sessions, jobs, PTYs, signals, and more using Rust. It explains /dev/tty and describes how terminal libraries like crossterm and termion build on top of stdio and /dev/tty. The article provides examples of using Rust to send and receive POSIX signals, communicate with processes via IPC, and spawn processes. Additionally, it includes examples of using PTY in Linux and controlling external commands (such as binaries like bash) using asynchronous Rust.
    • Build with Naz : Box and Pin exploration in Rust

      This tutorial, video, and repo are a deep dive into Rust `Pin` and `Box` types, along with concepts of ownership and borrowing. We will also cover a lot of background information on the concepts of operating system process, memory allocation and access, stack, and heap. The examples we create are designed to demonstrate the different semantics around the use of boxes and pinned boxes in Rust.
    • Build with Naz : Rust async in practice tokio::select!, actor pattern & cancel safety

      This tutorial, video, and repo are a deep dive into the concept of cancellation safety in async code using Tokio and Rust. It affects the `tokio::select!` macro, and what happens to the racing `Future`s that don't win. The examples provided here, along with the video, will go over both code that is is cancellation safe and code that is not. These examples reflect real-world patterns, and are a generalized form of them.
    • Build with Naz : Markdown parser in Rust and nom from r3bl_tui

      This tutorial and video are a deep dive in a real Markdown parser written using nom in Rust. This MD Parser is part of the r3bl_tui crate, which is part of the r3bl-open-core repo. It goes over the architecture of thinking about building complex parsers and the nitty gritty details the runtime nature and behavior when combining nom parsers.
    • Build with Naz : Comprehensive guide to nom parsing

      This tutorial and video are a comprehensive guide to parsing with nom. We cover the basics of parsing and how to use nom to parse a string into a data structure. And more complex topics like human readable error reporting, and building up complex parsers. We will create a variety of different examples ranging from parsing simple CSS like syntax to a full blown Markdown parser.
    • Create a simple DSL for CSS like syntax for TUIs

      Procedural macros are a way for you to extend the Rust compiler and provide plugins that you can use to extend the language. They allow to create your own DSL (domain specific language). This article goes into the details of creating a simple DSL to mimic CSS syntax but in Rust, for a TUI app framework.
    • 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.

    Subscribe to RSS feed