Rand Stats

Woxi

zef:antononcube

Raku-Woxi

Raku package for invoking Woxi, the Rust implementation of a subset of the Wolfram Language.


Prerequisite: install Woxi

Woxi is a separate project and is not bundled with this package. Install its woxi executable before using this module. Follow the installation directions in the Woxi README; it documents Cargo installation and prebuilt binaries.


Installation

From Zef ecosystem:

zef install Woxi

From GitHub:

zef install https://github.com/antononcube/Raku-Woxi.git

Usage

use Woxi;

my $result = woxi-eval('Plus[1, 2]');
say (:$result);
say $result.stdout;

my $script = woxi-run($*CWD.add(<resources analysis.wls>));
say $script.stdout;
# result => Woxi::Result.new(stdout => "3\n", stderr => "", exitcode => 0, signal => 0, source => "Plus[1, 2]")
# 3
# 
# 2*Sqrt[b]

The supported Wolfram Language subset is defined by Woxi itself; consult its README and function-status list.