Crate wolfram_app_discovery
source ·Expand description
Find local installations of the Wolfram Language and Wolfram applications.
This crate provides functionality to find and query information about Wolfram Language applications installed on the current computer.
Use cases
-
Programs that depend on the Wolfram Language, and want to automatically use the newest version available locally.
-
Build scripts that need to locate the Wolfram LibraryLink or WSTP header files and static/dynamic library assets.
- The wstp and wolfram-library-link crate build scripts are examples of Rust libraries that do this.
-
A program used on different computers that will automatically locate the Wolfram Language, even if it resides in a different location on each computer.
Examples
Find the default Wolfram Language installation on this computer
use wolfram_app_discovery::WolframApp;
let app = WolframApp::try_default()
.expect("unable to locate any Wolfram apps");
println!("App location: {:?}", app.app_directory());
println!("Wolfram Language version: {}", app.wolfram_version().unwrap());
Find a local Wolfram Engine installation
use wolfram_app_discovery::{discover, WolframApp, WolframAppType};
let engine: WolframApp = discover()
.into_iter()
.filter(|app: &WolframApp| app.app_type() == WolframAppType::Engine)
.next()
.unwrap();
Modules
- Functions for querying the locations of Wolfram development SDK resources, for use in build scripts.
- Configuration of
wolfram-app-discovery
behavior.
Structs
- Wolfram application version number.
- Wolfram app discovery error.
- A local installation of the Wolfram System.
- Wolfram Language version number.
- A local copy of the WSTP developer kit for a particular
SystemID
.
Enums
- Possible values of
$SystemID
. - Standalone application type distributed by Wolfram Research.
Functions
- Discover all installed Wolfram applications.
- Discover all installed Wolfram applications that match the specified filtering parameters.
- system_id_from_targetDeprecatedReturns the System ID value that corresponds to the specified Rust target triple, if any.
- target_system_idDeprecatedReturns the
$SystemID
value of the system this code was built for.