简体   繁体   English

如何在 MacOS 上从 Atom IDE 构建 Rust?

[英]How to build Rust from Atom IDE on MacOS?

Trying to learn Rust.尝试学习 Rust。 Recently installed Atom but found no way yet to build and run a Rust target.最近安装了 Atom,但还没有找到构建和运行 Rust 目标的方法。 I could do this in Sublime with RustEnhanced by just pressing Cmd-B .我可以通过按下Cmd-B在带有 RustEnhanced 的 Sublime 中做到这一点。 Installed Atom-build and build-cargo, my Rust setup should be fine since it works from Sublime (and command-line), but from Atom I only get "No build configuration exists".安装了 Atom-build 和 build-cargo,我的 Rust 设置应该没问题,因为它可以从 Sublime(和命令行)运行,但是从 Atom 我只得到“不存在构建配置”。 I thought just having build-cargo is enough, the Atom-build documentation apparently says that the build provider (build-cargo in this case) takes care of that.我认为只有 build-cargo 就足够了,Atom-build 文档显然说构建提供程序(在这种情况下是 build-cargo)负责。 What am I missing?我错过了什么?

Finally figured out a way to get what I needed.终于想出了一种方法来获得我需要的东西。 Install packages script and language-rust .安装包scriptlanguage-rust Then simply open a file with extension .rs and hit cmd-i ;然后只需打开一个扩展名为.rs的文件并点击cmd-i the file will be compiled and will immediately afterward run, with output displayed in the pop-up window in the lower part of the editor.该文件将被编译并在之后立即运行,输出显示在编辑器下部的弹出窗口中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM