Socket
Socket
Sign inDemoInstall

cloud-rustc

Package Overview
Dependencies
15
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cloud-rustc

从 crate 入口 rust 文件开始,分析 module 之间的层级关系,连接关联的多个 rust 文件成为一个 rust 文件。再把被连接在一起的单个 rust 文件发送给 https://play.rust-lang.org/execute 进行编译。最后,显示后端返回的内容。


Version published
Maintainers
1
Install size
575 kB
Created

Readme

Source

cloud-rustc

crate入口rust文件开始,分析modules之间的层级关系,连接关联的多个rust文件成为一个rust文件。再把被连接在一起的单个rust文件发送给POST - https://play.rust-lang.org/executePOST - https://play.rust-lang.org/compile云端服务进行编译。最后,显示云端编译后返回的结果(区分标准输出与标准错误输出)。

从而,利用Mozilla云端编译器,缓解本地rustc编译过慢(这逼着我换电脑呀!),但又急于获悉cargo test(甚至cargo run)运行结果的尴尬。

安装

npm i -g cloud-rustc

用法

cloud-rustc run -e rust-samples/sm4_like/mod.rs

子命令

命令描述
run功能等同于 cargo run
build功能等同于 cargo build
test功能等同于 cargo test
wasm编译生成 WEB 字节码文件
asm编译生成字节码文件
mir编译生成 MIR 文件
llvm-ir编译生成 LLVM-IR 文件
help [command]显示指定子命令的帮助信息

选项

选项描述
-e, --entry <uri>rust crate 入口文件
-md, --mode [mode]编译模式:debug | release (default: "debug")
-cl, --channel [channel]rustc 编译器类型:nightly | beta | stable (default: "nightly")
-ed, --edition [edition]rustc 编译器大版本号:2018 | 2015 (default: "2018")
-bt, --back-trace在错误信息中,显示详细的函数调用栈 (default: false)
-o, --output-file [file]输出编译结果至文件
-V, --version此工具当前版本号
-h, --help显示帮助信息

Keywords

FAQs

Last updated on 26 Dec 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc