Cargo
Cargo คือ build tool และ package manager ของ Rust รวมทุกอย่างที่ Developer ต้องใช้ไว้ในที่เดียว ทั้ง building, testing, documentation, และ dependency management
ลองนึกภาพว่า Cargo เป็นเหมือน “ผู้ช่วยส่วนตัว” ที่จัดการเรื่องน่าเบื่อทั้งหมด ทั้ง download libraries, compile code, run tests ให้เราแค่เขียน code!
1. Basic Commands
Section titled “1. Basic Commands”1.1 Project Management
Section titled “1.1 Project Management”# ============================================# สร้างโปรเจกต์ใหม่# ============================================cargo new my_project # Binary project (มี main.rs)cargo new --lib my_library # Library project (มี lib.rs)cargo new --vcs none my_app # ไม่สร้าง git repocargo init # Initialize ใน current directorycargo init --lib # Initialize as libraryเข้าสู่ระบบเพื่อดูเนื้อหาเต็ม
ยืนยันตัวตนด้วยบัญชี Google เพื่อปลดล็อกบทความทั้งหมด
Login with Google