A First Look at Learning Rust in 2022
2022-12-31
Introduction
2022 was the year I first got to know the Rust programming language. As a systems-level language, Rust caught my attention with its memory safety and high performance.
What I Learned
1. Rust Basic Syntax
In the second half of 2022, I began learning Rust's basic syntax:
- Variable bindings and mutability
- Data types (scalar and compound types)
- Defining and calling functions
- Control flow (if expressions, loops)
- The ownership system
2. Core Concepts
A deeper dive into Rust's core concepts:
- Ownership
- Borrowing
- Lifetimes
- Structs and enums
- Pattern matching
3. The Ecosystem
Getting to know the Rust ecosystem:
- Cargo package manager
- crates.io package registry
- Rustlings exercises
- Tauri desktop app framework
Hands-On Practice
Although I had only been learning for a short time, I tried some hands-on work:
- Writing simple Rust programs
- Working through Rustlings exercises
- Learning about Rust's applications in IoT
Key Takeaways
1. Broader Programming Thinking
- Understood the importance of memory safety
- Learned to think from the compiler's point of view
- Grasped the fundamentals of systems-level programming
2. Wider Technical Horizons
- Learned about trends in modern systems programming languages
- Recognized Rust's potential in WebAssembly, blockchain, and other fields
Looking Ahead
In 2023, I plan to keep digging deeper into Rust:
- Dig deeper into concurrent programming
- Practice Rust web development
- Explore Rust's use in IoT projects
- Learn async frameworks such as Tokio
As an emerging systems programming language, Rust has enormous potential. I will keep following and learning it, preparing myself for future hands-on technical work.