- 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.
- Cocos2d Cross-Platform Game Development Cookbook(Second Edition)
- Python量化投資指南:基礎、數據與實戰
- 軟件測試工程師面試秘籍
- oreilly精品圖書:軟件開發者路線圖叢書(共8冊)
- Android 7編程入門經典:使用Android Studio 2(第4版)
- Oracle數據庫從入門到運維實戰
- Windows Server 2012 Unified Remote Access Planning and Deployment
- Visual FoxPro程序設計
- Python機器學習基礎教程
- 程序是怎樣跑起來的(第3版)
- Node.js全程實例
- Visual Basic程序設計教程
- AIRIOT物聯網平臺開發框架應用與實戰
- 匯編語言編程基礎:基于LoongArch
- C專家編程