如何在Atom中构建或运行特定的Rust二进制项目?

时间:2016-11-11 06:34:45

标签: rust atom-editor

我使用单个Cargo.toml使用多个主文件:

[package]
name = "rust_example"
version = "0.1.0"
authors = [""]

[dependencies]

[[bin]]
name = "main"
path = "src/main.rs"

[[bin]]
name = "fibonachi"
path = "src/fibonachi/main.rs"

我在控制台上测试了

cargo run --bin main` and `cargo run --bin fibonachi

它正确编译。

我安装了Atom以及几个插件(build,build-cargo,busy,language-rust,linter)。当我使用Atom编译时,它会显示以下行:

error: `cargo run` requires that a project only have one executable; use the `--bin` option to specify which one to run
error: `cargo run` requires that a project only have one executable; use the `--bin` option to specify which one to run

我找不到如何在Atom中指定我想要构建的二进制文件。

0 个答案:

没有答案