View the latest development here: https://github.com/mkhan45/RustScript2
Download the latest version of this version of the RustScript CLI tool, or view all releases.
Don't forget to download the latest version from above, and install the RustScript toolchain as described in the
README.md
installation instructions file that comes pre-packaged.
Run the rsc
command with either the --help
or -h
option to show the user manual or help page for the CLI tool.
Execute scripts using the following command.
rsc hello.rs world.rs
Or if you haven't installed the native CLI binaries, run the rsc.jar
file using:
java -jar rsc.jar hello.rs
If you want to build RustScript on your own. Install the WiX Toolset (dist/tools/wix311.exe
) and run the build.bat
script from the root directory to build the Cli.java
class into the standalone executables to dist/bin/
.
You can also simply compile the class files by running the compile.bat
script from the root directory, and run any module using java Repl
for example.
Learn more about the RustScript language by visiting the links below! A good tip is to download the rsc
CLI tool and start playing around with the examples yourself!
Start the interactive REPL command tool by running rsc -r
or rsc --repl
. Once started, a little >
will appear prompting for an expression to evaluate. You can run anything here as long as it is kept on one line. Expression can be easily separated by semi-colons ;
, and their result will be displayed belowed.
There are also a set of custom commands used when moving around in the local file system. This is done to make it easier to navigate to files that you want to import variables from into your session.
Command | Arguments | Description |
---|---|---|
pwd | Display the current working directory | |
ls | List all files in the current working directory | |
cd | [path] | Change current working directory |
The RustScript language is developed by a group of volunteers. To further support the project, we welcome any and all feedback, contributions and engagement!
-
Join our discord server: https://discord.gg/qCc35JFCzZ
-
Contrubute code or documentation: https://github.com/WilliamRagstad/RustScript
-
Sponsor the project: https://github.com/sponsors/WilliamRagstad
Thanks goes to these wonderful people (emoji key):
William Rågstad 🚧 |
Mikail Khan 📖 |
Mike Samuel 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!
The logo is a modified image by Smashicons from Flaticon. The original images can be found here or in the assets folder.
RustScript is free and open source! All code in this repository is dual-licensed under either:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option. This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are very good reasons to include both. Read more about Rusts license model here.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
You can join our community discord server and chat with the dev team! All feedback and support is greatly appreciated!