rust - Rust 中有类似 nodemon 的东西吗?
问题描述
在 javascriptnodemon
中是一个静态文件服务器,它在代码更改时重新加载。我正在使用wasm-pack
并miniserve
执行两个命令:
build
wasm-pack build --target web --out-name wasm --out-dir ./static/build
serve
:
miniserve ./static --index index.html
我希望这两个能够像在 javascript 中一样自动化nodemon
。
解决方案
使用cargo-watch并通过 shell 命令执行 using -s
or --shell
flags:
cargo watch -s 'wasm-pack build --target web --out-name wasm --out-dir ./static/build && miniserve ./static --index index.html'
推荐阅读
- javascript - Javascript - 单击 div 内的按钮时检索 div 的值
- javascript - 损坏的图像链接
在反应引导 - java - 如何从 OnResponse 方法中访问响应值?
- flutter - Firestore 错误“控制器!= null”:不正确
- debugging - 在 DOSBox 中运行 ml program.asm 时 8086 程序没有输出
- r - 如何在坐标轴上绘制线性判别函数?
- javascript - 在 Froala 上选择元素
- android - AWS Amplify - Android - 将未知语言的文本翻译成英语
- php - 采摘 Laravel 集合
- inno-setup - 在 Inno Setup“完成”页面访问复选框控件的属性