2个版本
新 0.1.1 | 2024年8月18日 |
---|---|
0.1.0 | 2024年8月18日 |
#274 在 开发工具
每月175次下载
5KB
cargo-run-selectable
这是一个简单的Rust实用工具,帮助开发者在不事先指定的情况下,在具有多个二进制目标的工作区中运行cargo run
。当运行程序时,它将提示您从工作区中可用的二进制目标列表中选择一个目标。
特性
- 非常轻量级
- 无缝集成到Cargo工作流程中。
- 开箱即用
Windows不兼容
重要:由于Windows平台对process::CommandExt
特质exec
方法的支持不足,此实用工具目前不兼容Windows。该exec
方法对于用新进程替换当前进程至关重要,这在Windows中不是原生支持的。有关此限制的更多详细信息,您可以参考此解释。
因此,此实用工具最适合Linux和macOS等类Unix操作系统。
安装
您可以使用cargo
或binstall
直接从crates.io安装此实用工具。
使用cargo install
cargo install cargo-run-selectable
使用cargo binstall
cargo binstall cargo-run-selectable
从仓库克隆
git clone https://github.com/maciejlewandowskii/cargo-run-selectable
cd cargo-run-selectable
cargo build --release # now you can copy file from target/release and just use it
依赖项
~1.6–9.5MB
~84K SLoC