The Path of Scientific Computing in Rust – 1.2 Functions

📌 Introduction In programming, a function is like a “recipe”—you write a series of steps, and then you can reuse that logic by calling it. In scientific computing, many formulas and algorithms appear repeatedly, and packaging them into functions can make the code clearer and less error-prone. In fact, readers familiar with any high-level programming … Read more

Delving into the Internal Implementation of Rust Vec: Unveiling Hidden Fields

Introduction When you open the Rust standard library documentation to view the definition of <span>Vec<T></span>, have you noticed that mysterious line <span>{ /* private fields */ }</span>? As Rust developers, we use Vec every day, but what exactly is hidden inside? Today, let’s dive deep into the source code of the Rust standard library, peeling … Read more

What are the Naming Conventions for Rust Modules?

The naming conventions for Rust modules follow a clear community consensus and engineering practices, primarily consisting of the following core principles: 1. Basic Naming Style:Snake Case (snake_case) Rule: All module names must use all lowercase letters, with words separated by underscores <span>_</span> (for example: <span>network_utils</span>, <span>user_authentication</span>). Prohibited: Camel Case (e.g., <span>NetworkUtils</span> ❌) Kebab Case (e.g., … Read more

Getting Started with Rust Code (Part 5)

Getting Started with Rust Code (Part 5) This article mainly explains the control flow and iterators in Rust’s basic syntax. The control flow section covers conditional branches, loops, pattern matching, etc., while the iterators section progresses from basic concepts to custom iterators, explained step by step. During your learning process, don’t get too caught up … Read more

Is Rust Really Harder Than Other Languages? The Strictness at Compile Time Brings Peace of Mind at Runtime

Introduction In the world of programming languages, Rust has long been labeled as “difficult to learn.” Many developers find themselves tormented by concepts like the borrow checker and lifetimes when they first encounter Rust. But is this “difficulty” label really fair? Today, we will not discuss how hard Rust is to learn, but rather take … Read more

The Path to Stability in the Rust Ecosystem: Why Your Crate Should Release a 1.0 Version

Introduction In the Rust community, crates.io and its rich crate ecosystem have always been a highlight of the Rust language. However, a long-standing issue is hindering the development of the entire ecosystem: a large number of core crates remain stuck at version 0.x.x, unwilling to release a stable version 1.0.0. This article is based on … Read more

A Significant Amount of Rust Code Set to Join the Linux 6.18 Kernel

This article is from Phoronix Following the release of Linux version 6.17 yesterday, the merge window for the Linux 6.18 kernel has officially opened, and one thing is already quite clear: a significant amount of new Rust programming language code is set to enter the Linux 6.18 kernel. Before the official opening of the Linux … Read more

Is Rust Gaining Ground? Is C++’s ‘Iron Rice Bowl’ Still Secure?

Rust is gaining momentum; is C++’s ‘iron rice bowl’ still secure? Recently, the Stack Overflow annual developer survey results showed that Rust has been the most loved programming language for developers for seven consecutive years. On the other hand, as a perennial favorite in system programming languages, C++ still occupies an irreplaceable position in several … Read more

A Comprehensive Guide to Rust Standard Library Traits: Memory Management and Type Conversion

Introduction When building software systems, defining and using appropriate traits is key to making the code structure highly extensible and flexible. The Rust standard library provides a rich set of traits, and using them correctly not only clarifies the code structure but also aligns better with the conventions of the Rust ecosystem. This article will … Read more

Rust Axum Backend Series: Practical Implementation of Docker, Database, and Connection Pool

Introduction As the Rust language becomes increasingly popular in backend development, Axum, a high-performance and type-safe web framework, is gaining favor among developers. This article will guide you on how to integrate Docker and PostgreSQL database into an Axum project, and provide an in-depth understanding of how database connection pools work, which are fundamental elements … Read more