Created
August 7, 2019 11:07
-
-
Save wpcarro/66cc146ed0669a110f94cb9ee9089ab0 to your computer and use it in GitHub Desktop.
Ergonomic way to run individual Rust files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| runrust() { | |
| # Compile and run $1. Pass $1 as file.rs. | |
| # This is modelled after the `runhaskell` command. | |
| # Deletes the compiled binary after executing it. | |
| # | |
| # depends rustc | |
| rustc "$1" && "./${1%.rs}" && rm "${1%.rs}" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment