#wolfram #wolfram-language #discovery #mathematica #wolfram-engine

bin+lib wolfram-app-discovery

Find local installations of the Wolfram Language

7 releases

Uses new Rust 2021

new 0.3.0 Sep 19, 2022
0.2.2 Mar 7, 2022
0.2.0 Feb 16, 2022
0.1.2 Feb 9, 2022

#47 in Build Utils

Download history 47/week @ 2022-06-05 8/week @ 2022-06-12 23/week @ 2022-06-19 14/week @ 2022-06-26 11/week @ 2022-07-03 17/week @ 2022-07-10 21/week @ 2022-07-17 33/week @ 2022-07-24 30/week @ 2022-07-31 31/week @ 2022-08-07 18/week @ 2022-08-14 23/week @ 2022-08-21 26/week @ 2022-08-28 32/week @ 2022-09-04 18/week @ 2022-09-11 55/week @ 2022-09-18

138 downloads per month
Used in 5 crates (4 directly)




Crates.io License Documentation

API Documentation | Changelog | Contributing


Find local installations of the Wolfram Language and Wolfram applications.

This crate provides:

  • The wolfram-app-discovery library, whose API can be used programmatically from Rust code.
  • The wolfram-app-discovery executable, which can be used from the command-line.


Using the API

Locate the default Wolfram Language installation on this computer:

use wolfram_app_discovery::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:

$ ./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.


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):

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

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


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.


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.


~806K SLoC