- Rust Quick Start Guide
- Daniel Arbuckle
- 169字
- 2021-06-10 19:46:00
Starting a new project
Okay, so we've installed the compiler. Yay! But how do we use it?
The first step is to open up a command-line window, and navigate to the directory where we want to store our new project. Then we can create the skeleton of a new program with cargo new foo.
When we do this, cargo will create a new directory named foo and set up the skeletal program inside it.
The default is for cargo to create the skeleton of an executable program, but we can also tell it to set up a new library for us. All that takes is an additional command-line argument (bar is the name of the new directory that will be created, like foo): cargo new --lib bar.
When we look inside the newly created foo directory, we see a file called Cargo.toml and a sub-directory called src. There may also be a Git version control repository, which we will ignore for now.
- 微信公眾平臺與小程序開發:從零搭建整套系統
- 復雜軟件設計之道:領域驅動設計全面解析與實戰
- INSTANT OpenCV Starter
- 潮流:UI設計必修課
- Learning Apex Programming
- Linux C/C++服務器開發實踐
- 劍指Offer(專項突破版):數據結構與算法名企面試題精講
- Mastering phpMyAdmin 3.4 for Effective MySQL Management
- Go語言高效編程:原理、可觀測性與優化
- Getting Started with Python Data Analysis
- Yocto for Raspberry Pi
- STM8實戰
- SEO教程:搜索引擎優化入門與進階(第3版)
- JavaScript Concurrency
- 大話代碼架構:項目實戰版