Releases: WilliamRagstad/RustScript
New Modules and Exports!
For this release, we have added two enormous features to the language, modules and exports. Yes, these improvements will allow you to not only create modules containing public and private properties accessible from the outside of a module or within the same source code file.
Replace seq([exp1, exp2])
with { exp1; exp2 }
Blocks have their own scopes as well, and returns the value of the last expression in the sequence.
Installation
Windows
Download the rsc.zip
or rsc-2.3.0.msi
file and follow the instructions in README.md
.
MacOS and Linux
Download the rsc.jar
file and run as usual with java -jar rsc.jar
New
- Added Modules.
- Added Exports and Imports.
- Added Code Blocks, returning the value of the last expression.
GlobalScope
holding exported variables. This was made possible by thunneling the evaluated expression results using a newAtom.UnitBox
back toPublicExpr
which then could add the values to the export list if it is in theGlobalScope
.- Added support for relative paths when importing exported props from another file.
- Added REPL commands for moving around in the file system, and import from files.
Learn more by looking at the newly provided examples.
New RustScript CLI tool Windows Installer
Install the RustScript CLI tool rsc
just like any other toolchain, run the .msi
installer file, follow the installation instructions in README.md
and you're all good to go!
Installation
Windows
Download the rsc.zip
or rsc-2.2.0.msi
file and follow the instructions in README.md
.
MacOS and Linux
Download the rsc.jar
file and run as usual with java -jar rsc.jar
New
- Native
rsc
command support, no morejava -jar ...
- Execute any script file by simply double-clicking on them (Windows only)
- Easily install the toolchain
- Simpler updates support with this better abstraction
Keep code correct with the new Linter!
Yes, There is now a new linting tool built into the RustScript CLI!
Validate your scripts using the -l
or --lint
options.
-l, --lint [files]
Lints the given files.
Example
> java Cli -l test\input1.rs
Linting 1 file(s)...
Syntax error in 'test\input1.rs':
Error at line 5 column 16:
Expected RParen, got Ident 'println'
Found 1 errors.
Linting 1 file(s)...
All files passed!
New extensive CLI tool!
RustScript now comes pre-packaged inside the recently developed CLI tool rsc
.
This is a command you can run to directly execute your script files, interact with the playful REPL or in upcoming releases, lint or even compile your scripts into other programming languages.
> java -jar rsc.jar
RustScript CLI version 0.1.0.
A simple command line interface tool for the RustScript language.
Usage: rsc (options) (files)
Options:
-h, --help
Prints this help message.
-v, --version
Prints the version of the program.
-r, --repl
Starts the REPL mode.
-c, --compile [files] (Not implemented)
Compiles the given files.
-l, --lint [files] (Not implemented)
Lints the given files.
Execute scripts: rsc [files]
Interprets the given script files one at a time.
Copyright (c) 2021 William Rågstad
First release of RustScript
Initial release
This is the initial public release of the RustScript language Interpreter!🎉
Usage
Download the RustScript.jar
file below and run it in your terminal using:
java -jar RustScript.jar <script>
Create a .rs
script file and begin coding away!
Examples and short documentation can be found in this repository.