wolfram-app-discovery

Crates.io License Documentation

API Documentation | Changelog | Contributing

About

Find local installations of the Wolfram Language and Wolfram applications.

This crate provides:

Examples

Using the API

Locate the default Wolfram Language installation on this computer: ```rust use wolframappdiscovery::WolframApp;

let app = WolframApp::try_default() .expect("unable to locate any Wolfram applications");

// Prints a path like: // $InstallationDirectory: /Applications/Mathematica.app/Contents/ println!("$InstallationDirectory: {}", app.installation_directory().display()); ```

See also: WolframApp::try_default()

Using the command-line tool

Locate the default Wolfram Language installation on this computer:

```shell $ ./wolfram-app-discovery Default Wolfram Language installation:

Product: Mathematica Wolfram Language version: 13.0.0 $InstallationDirectory: /Applications/Wolfram/Mathematica-13.0.0.app/Contents ```

See CommandLineHelp.md for more information on the wolfram-app-discovery command-line interface.

Configuration

The default method used to locate a Wolfram Language installation (WolframApp::try_default()) will use the following steps to attempt to locate any local installations, returning the first one found:

  1. The location specified by the WOLFRAM_APP_DIRECTORY environment variable, if set.
  2. If wolframscript is on PATH, use it to locate the system installation.
  3. Check in the operating system applications directory.

Configuration example

Specify a particular Wolfram Language installation to use (on macOS):

shell $ export WOLFRAM_APP_DIRECTORY="/Applications/Mathematica.app"

This environment variable is checked by both the wolfram-app-discovery library and command-line executable.

License

Licensed under either of

at your option.

Wolfram application licenses

Wolfram applications are covered by different licensing terms than wolfram-app-discovery.

The Wolfram Engine for Developers is a free distribution of the Wolfram Language, licensed for personal and non-production use cases.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

See CONTRIBUTING.md for more information.