Skip to content

Releases: WilliamRagstad/RustScript

New Modules and Exports!

13 Aug 16:22
533a3b1
Compare
Choose a tag to compare

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 new Atom.UnitBox back to PublicExpr which then could add the values to the export list if it is in the GlobalScope.
  • 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

09 Aug 10:59
Compare
Choose a tag to compare

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 more java -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!

06 Aug 08:09
Compare
Choose a tag to compare

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!

05 Aug 21:42
Compare
Choose a tag to compare

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

05 Aug 15:34
Compare
Choose a tag to compare

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.