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§
- build_
scripts - Functions for querying the locations of Wolfram development SDK resources, for use in build scripts.
- config
- Configuration of
wolfram-app-discovery
behavior.
Structs§
- AppVersion
- Wolfram application version number.
- Error
- Wolfram app discovery error.
- Wolfram
App - A local installation of the Wolfram System.
- Wolfram
Version - Wolfram Language version number.
- WstpSdk
- A local copy of the WSTP developer kit for a particular
SystemID
.
Enums§
- SystemID
- Possible values of
$SystemID
. - Wolfram
AppType - Standalone application type distributed by Wolfram Research.
Functions§
- discover
- Discover all installed Wolfram applications.
- discover_
with_ filter - Discover all installed Wolfram applications that match the specified filtering parameters.
- system_
id_ from_ target Deprecated - Returns the System ID value that corresponds to the specified Rust target triple, if any.
- target_
system_ id Deprecated - Returns the
$SystemID
value of the system this code was built for.