Skip to content
This repository has been archived by the owner on Jun 19, 2022. It is now read-only.
/ rust-play Public archive

A Rust Playground CLI client

License

Notifications You must be signed in to change notification settings

xfgusta/rust-play

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rust-play

A Rust Playground CLI client

Examples

$ rsplay < examples/add.rs
3
$ rsplay -s < examples/love.rs
ID: 3efd14d55cbbbb72b7032a170b4d9348
Playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=3efd14d55cbbbb72b7032a170b4d9348
Gist: https://gist.github.com/rust-play/3efd14d55cbbbb72b7032a170b4d9348
$ rsplay -g 3efd14d55cbbbb72b7032a170b4d9348
fn main() {
    for _ in 1..=100 {
        println!("I love Rust");
    }
}
$ rsplay -r 3efd14d55cbbbb72b7032a170b4d9348
I love Rust
I love Rust
I love Rust
I love Rust
I love Rust
[...]
$ cat examples/ferris.rs | rsplay
   Compiling playground v0.0.1 (/playground)
error[E0423]: expected function, found macro `println`
 --> src/main.rs:2:5
  |
2 |     println("Ferris");
  |     ^^^^^^^ not a function
  |
help: use `!` to invoke the macro
  |
2 |     println!("Ferris");
  |            ^

error: aborting due to previous error
[...]

Use rsplay -h for more options.

License

The MIT License (MIT)

Copyright (c) 2021 Gustavo Costa