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

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.

主站蜘蛛池模板: 时尚| 广平县| 将乐县| 慈溪市| 手游| 吉木萨尔县| 凤翔县| 榕江县| 盐亭县| 济南市| 林州市| 灵璧县| 外汇| 神木县| 邵阳市| 吴江市| 丰原市| 东阳市| 新闻| 河间市| 华阴市| 阿拉善右旗| 青龙| 康平县| 乐业县| 密山市| 天等县| 治多县| 通榆县| 陵水| 常德市| 美姑县| 沙河市| 澄城县| 蒙阴县| 商水县| 什邡市| 阆中市| 城固县| 任丘市| 青海省|