- Mastering Rust
- Rahul Sharma Vesa Kaihlavirta
- 152字
- 2021-07-02 13:35:21
cargo-watch
Cargo-watch helps you shorten your fix, compile, run cycle by automatically building your project in the background whenever you make changes to your code. By default, this just runs Rust's type checker (the cargo check command) and does not undergo the code generation phase (which takes time) and shortens the compile time. A custom command can also be provided instead of cargo check using the -x flag.
We can install cargo-watch by running cargo install cargo-watch, and then within any Cargo project we can run it by invoking cargo watch. Now, whenever we make changes to our project, cargo-watch will run cargo check in the background and recompile the project for us. In the following code, we made a typo and corrected it, and cargo-watch recompiled the project for us:

This will be a very similar experience if you know about the watchman or nodemon packages from the Node.js ecosystem.
- Xcode 7 Essentials(Second Edition)
- Access 2010數據庫基礎與應用項目式教程(第3版)
- Python程序設計
- Banana Pi Cookbook
- HTML5+CSS3網頁設計
- 數據結構與算法分析(C++語言版)
- ASP.NET Core 2 Fundamentals
- Solr Cookbook(Third Edition)
- Troubleshooting Citrix XenApp?
- Backbone.js Testing
- 算法圖解
- Python 3 Object:oriented Programming(Second Edition)
- Application Development with Parse using iOS SDK
- R的極客理想:量化投資篇
- UML基礎與Rose建模實用教程(第三版)