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

Understanding the Manacher’s Algorithm in Rust

Understanding the Manacher's Algorithm in Rust

What is Manacher’s Algorithm In the fascinating world of string processing, there is a classic problem that has captivated countless algorithm enthusiasts: finding the longest palindromic substring in a string. A palindromic string is like a symmetrical artwork in the realm of strings, reading the same forwards and backwards, such as “level” or “madam”. The … Read more

Concurrent Programming in Rust: A Detailed Explanation of Core Methods for Data Sharing Between Threads

Concurrent Programming in Rust: A Detailed Explanation of Core Methods for Data Sharing Between Threads

Concurrent Programming in Rust: A Detailed Explanation of Core Methods for Data Sharing Between Threads In modern computing, multithreaded programming is key to enhancing application performance and achieving high concurrency. However, data sharing between threads has always been a significant challenge in concurrent programming, fraught with pitfalls such as data races and deadlocks. The Rust … Read more

What is the Experience of Rewriting Nearly 60,000 Lines of C++ Code in Rust?

What is the Experience of Rewriting Nearly 60,000 Lines of C++ Code in Rust?

From WeChat Official Account:OSC Open Source Community Link: https://www.oschina.net/news/327176/fishshell-rustport Fish is a command-line shell for Linux and macOS, known for its ease of use, powerful features, intelligence, and user-friendliness.Many features that other shells require configuration for are provided by default in fish, without any setup needed. At the beginning of 2023, the author of fish … Read more

One-Click Installation for Linux Web Environment (Non-Docker)

One-Click Installation for Linux Web Environment (Non-Docker)

Deploying common services on Linux systems often requires cumbersome steps, especially for beginners. This article organizes four practical one-click installation scripts covering the Rust development environment, Tomcat server, Docker container engine, and Nginx web server, helping you quickly set up the required environment. Script List Rust Installation Script (<span>rust_install.sh</span>) – Installs the Rust development environment … Read more

Is Rust Worth Investing in as a Skill Like Retirement Insurance?

Is Rust Worth Investing in as a Skill Like Retirement Insurance?

A user asked: Is Rust worth investing in as a skill like retirement insurance? My answer: Unless you are working on low-level tools, kernel modules, drivers, etc., where performance is critically important and you do not want runtime garbage collection to interfere with performance, and the requirements are fixed in direction. Otherwise, I do not … Read more

Rust: A New Engine for Python Performance Optimization

Rust: A New Engine for Python Performance Optimization

Rust: A New Engine for Python Performance Optimization Introduction For a long time, Python developers have faced a dilemma: should they write elegant and readable code, or pursue high performance? Traditionally, when performance is critical, developers turn to C extensions. However, this landscape is changing—Rust is becoming a powerful ally for Python performance optimization. The … Read more