rust-without-rust
This is a small tool written in Python which allows you to compile simple Rust code through http://play.rust-lang.org.
Installation
You can install this package from PyPi.
pip install rust-playground
You can also clone this repository locally and run setup.py.
python setup.py install
Usage
usage: playground [-h] [--release] [--channel {stable,nightly,beta}]
[--target {llvm-ir,wasm,asm,mir,ast}] [--disable-color]
FILE
Use Python to execute simple Rust code by running it on https://play.rust-
lang.org/
positional arguments:
FILE path to file containing Rust code
optional arguments:
-h, --help show this help message and exit
--release build artifacts in release mode, with optimizations
(default: False)
--channel {stable,nightly,beta}
set Rust channel (default: stable)
--target {llvm-ir,wasm,asm,mir,ast}
build for the target triple (default: ast)
--disable-color disable colors and styles for stderr (default: False)
Example
Say you want to quick test some Rust code but your current machine doesn't have the Rust compiler installed.
// test.rs
fn main() {
for x in 1..5 {
println!("{}", x);
}
}
$ playground test.rs
Compiling playground v0.0.1 (file:///playground)
Finished dev [unoptimized + debuginfo] target(s) in 2.36s
Running `target/debug/playground`
1
2
3
4
It reads your test.rs and passes it to http://play.rust-lang.org for compilation
and then returns stdout/stderr output on your terminal, which looks very alike to
$ cargo run.
License
Metadata
Release files for rust-playground 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rust_playground-0.1.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for rust_playground-0.1.1-py2.py3-none-any.whl |
Release files / rust_playground-0.1.1-py2.py3-none-any.whl
| Download URL | rust_playground-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
6779f026aeb0369bfbc9793cbb68427a130b000517db5552b5a36cbd3bb719ca
|
|
BLAKE2b-256 checksum How to use checksums |
c30b0046db21dca1743a10a4294ddd798468da862fdd6640f492dd5719040127
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for rust-playground 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.