官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 翁牛特旗| 商河县| 五台县| 南昌市| 江津市| 徐水县| 太仓市| 什邡市| 元氏县| 分宜县| 商河县| 乌什县| 太湖县| 浏阳市| 砚山县| 惠水县| 玛多县| 大关县| 皋兰县| 双桥区| 淳安县| 右玉县| 堆龙德庆县| 克拉玛依市| 永登县| 禄劝| 太原市| 华亭县| 什邡市| 寿阳县| 静宁县| 田东县| 抚顺县| 辰溪县| 左云县| 罗山县| 神木县| 常熟市| 安顺市| 元江| 六枝特区|