- 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.
- 手機安全和可信應用開發指南:TrustZone與OP-TEE技術詳解
- Building Mobile Applications Using Kendo UI Mobile and ASP.NET Web API
- FLL+WRO樂高機器人競賽教程:機械、巡線與PID
- 運維前線:一線運維專家的運維方法、技巧與實踐
- Mastering Elasticsearch(Second Edition)
- 零代碼實戰:企業級應用搭建與案例詳解
- Learning Python Data Visualization
- 奔跑吧 Linux內核
- Ext JS 4 Plugin and Extension Development
- Mastering Embedded Linux Programming
- Qt 5.12實戰
- Instant Pygame for Python Game Development How-to
- Mastering ArcGIS Server Development with JavaScript
- MySQL核心技術與最佳實踐
- Practical Responsive Typography