Practical Implementation of Database Connection Pooling with Rust and PostgreSQL: deadpool and diesel

Practical Implementation of Database Connection Pooling with Rust and PostgreSQL: deadpool and diesel (Part 4) The idea behind developing RTMate in Rust is to create a platform that provides WebSocket connection services, eliminating the need for users to set up their own WebSocket services. In this process, it is essential to manage different tenants and … Read more

Rust DDD Practice: Attribute Macros Eliminate ID Value Object Boilerplate Code

Introduction: The Pain of ID Value Object Boilerplate Code and the Value of Macros In the previous article, we explored how to utilize the pattern in Domain-Driven Design (DDD) to implement Value Objects, particularly aggregate roots. We confirmed the core values brought by this pattern: strong type safety, compile-time checks, and zero-cost abstractions. However, when … Read more

Mastering Rust’s Super Useful Syntax Sugar in 30 Days

Overview The design of the Rust language places a strong emphasis on developer experience, which is why it includes many practical “syntax sugars”. These “syntax sugars” make the code more concise and readable while maintaining the language’s power and flexibility. 1. String Interpolation String interpolation allows us to embed the values of variables or expressions … Read more

Rust Algorithm: Single Number

136. Single Number Introduction Given a non-empty integer array nums, where every element appears twice except for one, find that single element. You must design and implement an algorithm with linear time complexity that uses only constant extra space. Example 1: Input: nums = [2,2,1] Output: 1 Example 2: Input: nums = [4,1,2,1,2] Output: 4 … Read more

tsink – High-Performance Rust Embedded Time Series Database

Project Overview tsink is a high-performance embedded time series database engine written in Rust, focusing on efficient storage and retrieval of time series data. This project is open-source under the MIT license, featuring lightweight and high-performance characteristics, making it particularly suitable for applications that need to handle large amounts of time series data. Core Features … Read more

Rust Learning Plan – Day 6: Structs and Methods

Day 6: Structs and Methods (struct & impl)。Today, we will give your code some “shape” and “behavior”—Rust’s structs and methods are similar to Python’s classes, but lighter and more rigorous. Day 6 Learning Plan (Approx. 1–2 hours) Learning Objectives • Define and use structs (<span>struct</span>) • Implement methods (<span>impl</span> block) • Understand the relationship between … Read more

rustfmt: Architectural Practices of Rust’s Official Code Formatting Tool

The official code formatting tool for Rust, based on an AST-driven intelligent layout engine, supports CI integration and editor interaction, allowing for a unified team code style with a single command—an essential infrastructure for backend collaboration. Original text and source: https://yunpan.plus/t/315-1-1 “Is your team still arguing over code style? A single <span>cargo fmt</span> command can … Read more

Is C++ Still Worth Learning Amidst Criticism of Complexity and Safety?

This article is reprinted with permission from the WeChat public account CSDN (ID: CSDNnews) Author | Dayvi Schuster, Editor | Su Ma In the world of programming languages, C++ has always been surrounded by controversy. On one hand, it is criticized for being complex, difficult to learn, and prone to “trapping” programmers; on the other … Read more

Rust Learning Plan – Day 3 Basic Operations and Control Flow

Today’s topic is: Control Flow — enabling your program to make choices, loop, and have logic. Rust’s control flow is similar to Python but is stricter and safer. Day 3 Learning Plan (approximately 1–2 hours) Learning Objectives • Master <span>if</span>, <span>else if</span>, and <span>else</span> • Understand the three types of loops: <span>loop</span>, <span>while</span>, and <span>for</span> … Read more