rust
Installation
SKILL.md
Rust
Overview
Rust programming patterns including ownership, lifetimes, traits, and async programming.
Ownership and Borrowing
Basic Ownership
fn main() {
// Ownership transfer (move)
let s1 = String::from("hello");
let s2 = s1; // s1 is moved to s2
// println!("{}", s1); // Error: s1 is no longer valid