Introduction to Rust Programming: Parsing Command Line Arguments

Introduction to Rust Programming: Parsing Command Line Arguments

14.1 Parsing Command Line Arguments Building command line tools (CLI) is a common task in Rust practical projects. Rust provides various ways to parse command line arguments, with the most common approach being the use of third-party libraries like <span>clap</span> or <span>structopt</span>. These libraries help us easily define and parse command line arguments, handle user … Read more

Understanding Rust’s Smart Pointers: Box, Rc, and RefCell

Understanding Rust's Smart Pointers: Box, Rc, and RefCell

Introduction In Rust, memory management is a very important task. Rust helps developers avoid many common memory issues through mechanisms such as ownership, borrowing, and lifetimes. However, Rust also provides some smart pointers for handling heap-allocated memory, which not only simplify memory management but also give us more flexibility. This article will detail several smart … Read more

Building a Compiler with Rust and LLVM

Building a Compiler with Rust and LLVM

Cyclang is a simple statically typed programming language that supports basic language constructs such as functions, control flow, and arithmetic operations. The language’s feature design is very concise, and the complete language specification can be referenced in the official documentation. The focus of this project is on the process of building a compiler from scratch … Read more

Rust 2020 Development Vision: Embracing GUI

Rust 2020 Development Vision: Embracing GUI

The Rust core development team released a call for papers last month on their blog aimed at the Rust community, hoping to gather thoughts and suggestions on how Rust should develop in 2020. They stated that team members would read all submissions and subsequently produce a “Roadmap RFC” to form a formal proposal. Any ideas … Read more

Exploring the Rust Compiler: GCC vs LLVM

Exploring the Rust Compiler: GCC vs LLVM

The Rust compiler uses a borrow checker to optimize code performance and memory management. Rust code is compiled using the official compiler rustc. rustc uses LLVM optimizations on the backend to convert high-level Rust code into low-level machine code. However, a new GCC frontend called gccrs has recently emerged as an alternative to the rustc … Read more

Microsoft: Using Rust to Rewrite Windows Components

Microsoft: Using Rust to Rewrite Windows Components

In July, we reported that “Microsoft is exploring Rust as a safe alternative to C and C++“. According to Microsoft, Rust is a programming language that fundamentally considers safety. They will attempt to rewrite various products using Rust, as over 70% of the security patches provided by the company in the past decade have addressed … Read more

The Myth of Rust Being Difficult to Learn

The Myth of Rust Being Difficult to Learn

Organized by Noah In recent years, the presence of Rust has been increasing, but its steep learning curve seems daunting. However, an internal survey by Google suggests that the notion of Rust being “difficult to learn” may just be a rumor. Is Rust really hard to learn? Why does Google support Rust when it has … Read more

Google Programmer Finds Learning Rust Easy

Google Programmer Finds Learning Rust Easy

Produced by | OSC Open Source Community (ID: oschina2013) Based on Google’s internal experiences with using Rust, they shared their insights on this “popular” programming language, including clarifications on common Rust myths. 1. Rust Requires At Least 6 Months to Learn Google refuted this claim. According to an internal survey, over 2/3 of respondents felt … Read more

Rust: The Ideal Replacement for Python

Rust: The Ideal Replacement for Python

Set Script Home as “Starred⭐” Receive article updates in real-time Source: Rust Development Notes (ID: gh_8009fefbaa0f) In the current programming world, Python is widely accepted by developers, and it goes without saying. Its concise and powerful features allow developers to quickly write efficient and readable code. However, as software projects become increasingly complex, code efficiency … Read more

Experience of Developing Cross-Platform Games with Rust

Experience of Developing Cross-Platform Games with Rust

1. Introduction Since being captivated by the MOD magic of Warcraft III in my childhood, I have always had a special affection for game scripting languages. Looking back, developing game levels for Warcraft III using Blizzard’s JASS language, although JASS seems extremely rudimentary from today’s perspective, characterized by static typing and no garbage collection, it … Read more