A Rust-based interpreter for a subset of the Wolfram Language.
The initial focus is to implement a subset of the Wolfram Language so that it can be used for CLI scripting and Jupyter notebooks. For example:
#!/usr/bin/env woxi
(* Print 5 random integers between 1 and 6 *)
Print[RandomInteger[{1, 6}, 5]]
Check out the CLI tests directory to see all currently supported commands and their expected output. All tests must pass with Woxi and WolframScript.
Check out the functions.csv file for a list of all Wolfram Language functions and their implementation status.
Woxi runs faster than WolframScript as there is no overhead of starting a kernel and verifying its license.
To use Woxi, you need to have Rust's cargo installed on your system.
cargo install woxi
If you want to build Woxi from source, you need to have Rust installed. You can get it from rust-lang.org.
Clone the repository, build the project, and install it:
git clone https://github.com/ad-si/Woxi
cd Woxi
make install
You can use the interpreter directly from the command line:
woxi eval "1 + 2"
# 3
woxi eval 'StringJoin["Hello", " ", "World!"]'
# Hello World!
Or you can run a script:
woxi run tests/cli/hello_world.wls
You can also use Woxi in Jupyter notebooks. Install the kernel with:
woxi install-kernel
Then start the Jupyter server:
cd examples && jupyter lab
CLI Comparison With WolframScript
Woxi | WolframScript |
---|---|
woxi eval "1 + 2" |
wolframscript -code "1 + 2" |
woxi run script.wls |
wolframscript script.wls |
woxi repl |
wolframscript |
Contributions are very welcome! Please feel free to submit a Pull Request.
To run the test suite:
make test
- CodeParser - Parse Wolfram Language as AST or CST.
- Mastika - Rust-based implementation of Wolfram Mathematica.
- MMA Clone - Simple Wolfram Language clone in Haskell.
- TS Wolfram - Toy Wolfram Language interpreter in TypeScript.
- Wolfram JS Frontend - Open-source notebook interface for Wolfram Language.
- Wolfram Parser - Wolfram Language parser in Rust.
- wolfram-ast - A Wolfram Language parser written in pure Rust.
- wolfram-exchange - Wolfram exchange format with Rust.
- wolfram-expr - Representing Wolfram Language expressions in Rust.
- Wolfram-Language-Parser - Wolfram Language parser in Java.