Skip to content

ConnorGray/wolfram-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wolfram-client

Wolfram client library for Rust.

Examples

Perform an evaluation by launching a Wolfram Kernel and entering an input:

use wolfram_client::{Packet, WolframSession};

let mut kernel = WolframSession::launch_default_kernel().unwrap();

// In[1]:=
let Packet::InputName(_) = kernel.packets().next().unwrap() else { panic!() };

// Compute the first 10 prime numbers.
kernel.enter_text("Prime[Range[10]]");

// Out[1]=
let Packet::OutputName(_) = kernel.packets().next().unwrap() else { panic!() };

let Packet::ReturnText(result) = kernel.packets().next().unwrap() else { panic!() };

assert_eq!(result, "{2, 3, 5, 7, 11, 13, 17, 19, 23, 29}");

About

Wolfram client library for Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages