Dynamic Dispatch and Generics in Rust: Making Informed Choices

Dynamic Dispatch and Generics in Rust: Making Informed Choices

Introduction In the world of Rust programming, we often need to choose between dynamic dispatch and static dispatch (achieved through generics and monomorphism). This choice is not always about performance, but rather a trade-off between code design and flexibility. This article will take you deep into the implementation principles and use cases of these two … Read more

A Step-by-Step Tutorial for Developing an Operating System in Rust for Raspberry Pi (Raspberry Pi 3 / 4)

A Step-by-Step Tutorial for Developing an Operating System in Rust for Raspberry Pi (Raspberry Pi 3 / 4)

rust-raspberrypi-OS-tutorials is a step-by-step tutorial for developing an operating system in Rust, aimed at Raspberry Pi (Raspberry Pi 3 / 4). Each chapter (tutorial) is a bootable, standalone kernel version, and subsequent chapters expand on the functionality of the previous ones. The author breaks down common OS tasks from the basics of “writing characters to … Read more

ESP32 Microcontroller LED Control with Rust

ESP32 Microcontroller LED Control with Rust

ESP32 Microcontroller LED Control with Rust When you step into the world of Rust embedded development, controlling the ESP32 microcontroller to light up an LED and make it blink regularly feels like your first conversation with hardware. Based on the previous Rust embedded ESP32 “Hello World”, we will modify the code. Modify the Code Add … Read more

Implementing Embedded Programming on ESP32 Using Rust

Implementing Embedded Programming on ESP32 Using Rust

With the rapid development of the Internet of Things and embedded systems, developers are increasingly demanding efficient and reliable programming interfaces. The Rust programming language, known for its excellent memory safety and concurrency performance, is gaining more attention in the embedded development field. The esp-hal project is a perfect example of the combination of Rust … Read more

Rust Embedded Development with ESP32 Microcontroller

Rust Embedded Development with ESP32 Microcontroller

Rust Embedded Development with ESP32 Microcontroller Learn Rust embedded development with the ESP32 microcontroller, starting with printing “hello world”. Setting Up the Environment: Relevant link: https://docs.espressif.com/projects/rust/book/ Install <span>rust</span> https://www.rust-lang.org/zh-CN/tools/install Verify successful installation: cargo -V Install <span>espup</span> cargo install espup –locked <span>espup</span> Install related dependencies espup install Install <span>ldproxy</span> related configuration cargo install ldproxy Install <span>esp-generate</span> … Read more

Feasibility of Pluginization in Tauri Applications for GUI Development with Rust

Feasibility of Pluginization in Tauri Applications for GUI Development with Rust

There are several approaches to pluginization, including <span>Webview</span>, iframe, and shadow DOM. Essentially, a <span>sandbox</span> is needed to load untrusted third-party resources without affecting the main application. Webview Whether in Tauri or Electron, the structure of the application window is generally as follows: +————————————-+ | Window | | +——————————-+ | | | WindowApp | | … Read more

The Way of Rust: Seeking the True Meaning of Software Development through Mastery and Restraint

The Way of Rust: Seeking the True Meaning of Software Development through Mastery and Restraint

In today’s rapidly evolving programming language ecosystem, Rust is undoubtedly a shining star. It has won the title of “Most Loved Programming Language” in the Stack Overflow Developer Survey for several consecutive years, attracting the attention of countless developers from diverse backgrounds. However, amidst this learning frenzy, a crucial question needs to be addressed: what … Read more

Practical Guide to Rust Constructors: From Beginner to Expert

Practical Guide to Rust Constructors: From Beginner to Expert

This article is from https://substack.com/@cuongleqq/p-171247647 Every serious Rust developer should master constructor patterns to avoid looking like a novice. I used to think that <span>new</span> was the constructor in Rust. I was wrong; it is just a conventional method for creating new struct instances. Later, I encountered <span>with_capacity</span>, <span>Default</span>, <span>TryFrom</span>, and the builder pattern (which … Read more

Building an Operating System from Scratch on Raspberry Pi with Rust: A Tutorial That Will Make You Fall in Love with Bare-Metal Programming

Building an Operating System from Scratch on Raspberry Pi with Rust: A Tutorial That Will Make You Fall in Love with Bare-Metal Programming

rust-raspberrypi-OS-tutorials is a series of tutorials aimed at enthusiasts/self-learners, teaching you how to write a monolithic operating system kernel in Rust, targeting the Raspberry Pi (mainly Pi 3 and Pi 4). Each lesson provides a bootable and runnable kernel image, with subsequent lessons building on the previous ones, ultimately allowing you to run it in … Read more

Rust Web Practical: Building Elegant Unified Error Handling in Actix Web

Rust Web Practical: Building Elegant Unified Error Handling in Actix Web

Rust Web Practical: Building Elegant Unified Error Handling in Actix Web Error handling is an essential core aspect when building any robust web service. A good service should not only run stably under normal conditions but also provide clear, unified, and safe responses when encountering issues such as database connection failures, invalid user input, or … Read more