Skip to content

Latest commit

 

History

History
505 lines (319 loc) · 18 KB

CHANGELOG.md

File metadata and controls

505 lines (319 loc) · 18 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.4.8 — 2023-06-14

Fixed

  • Fix issue with WSTP static library name being determined based on compile time Rust target OS instead of System ID specified by the caller at runtime. (#66)

    This caused WstpSdk::try_from_directory() and WstpSdk::try_from_directory_with_system_id() to look for the WSTP static library in the wrong place when doing cross-compilation operations.

0.4.7 — 2023-06-12

Added

  • Added new SystemID enum. (#63)

    This enum has a variant for each value of Wolfram $SystemID that is in common use.

    • SystemID::current_rust_target() can be used to get the Wolfram system ID of the current Rust target.
    • SystemID::try_from_rust_target() takes a Rust target triple and returns the corresponding Wolfram system ID.
  • Added new WstpSdk struct. (#63)

  • Added new WolframApp::wstp_sdks() method to enumerate each per-SystemID copy of the WSTP SDK that is bundled within a particular Wolfram app installation. (#63)

  • Added new WolframApp::target_wstp_sdk() method to get the WSTP SDK appropriate for the current Rust target. (#63)

Deprecated

The following items have been deprecated and will be removed in a future version of wolfram-app-discovery:

  • wolfram_app_discovery::target_system_id()
  • wolfram_app_discovery::system_id_from_target()
  • WolframApp::wstp_c_header_path()
  • WolframApp::wstp_static_library_path()
  • WolframApp::wstp_compiler_additions_directory()

0.4.6 — 2023-06-11

Added

  • Added new WolframVersion::new() method. (#60)

0.4.5 — 2023-05-19

Fixed

  • Fixed wstp_c_header_path() and wstp_static_library_path() in the wolfram_app_discovery::build_scripts module returning the path to the CompilerAdditions directory instead of, respectively, the path to wstp.h and the WSTP static library. (#58)

0.4.4 — 2023-03-27

Fixed

  • Support discovery of older Mathematica versions on Linux. (#52)

    This fixes one problem described in #51.

0.4.3 — 2023-02-03

Added

  • Added logging output along discovery success and error code paths using the log crate logging facade. (#48)

    Programs making use of wolfram-app-discovery can enable logging in their application by initializing a logging implemenation compatible with the log crate. env_logger is a common choice for logging that can be customized via the RUST_LOG environment variable.

    Logging in Rust build scripts

    Rust crate build.rs scripts using wolfram-app-discovery are strongly encouraged to use env_logger to make debugging build script behavior easier.

    Adding logging to a build.rs script can be done by adding a dependency on env_logger to Cargo.toml:

    [build-dependencies]
    env_logger = "0.10.0"

    and initializing env_logger at the beginning of build.rs/main():

    fn main() {
        env_logger::init();
    
        // ...
    }

    Logging output can be enabled in subsequent crate builds by executing:

    $ RUST_LOG=trace cargo build

    Note that cargo will suppress output printed by build scripts by default unless the build script fails with an error (which matches the expected usage of logging output: it is most useful when something goes wrong). Verbose cargo output (including logging) can be enabled using cargo -vv.

0.4.2 — 2023-02-02

Fixed

  • Workaround issue with Wolfram pre-release builds with app version numbers that overflow u32 version fields. (#46)

0.4.1 — 2023-01-06

Added

  • Add new .github/workflows/build-executables.yml file, which was used to retroactively build precompiled binaries for the v0.4.0 release of the wolfram-app-discovery command-line tool. (#31, #32, #33)

  • Improve README.md with new 'CLI Documentation' quick link and 'Installing wolfram-app-discovery' sections, and other minor link and wording changes. (#34, #35)

  • Make major improvements to the wolfram-app-discovery command-line tool. (#36, #39)

    • The following options are now supported on the default, list, and inspect subcommands:

      • --property <PROPERTIES> (alias: --properties)
      • --all-properties
      • --format <FORMAT>

      If --format csv is specified, the output will be written in the CSV format.

      If --property is specified, only the properties listed as an argument will be included in the output.

      If --all-properties is specified, all available properties will be included in the output.

    • The default and inspect subcommands now support a --raw-value <PROPERTY> option, which will cause only the value of the specified property to be printed.

      This is useful when using wolfram-app-discovery as part of a compilation workflow or build script. For example:

      # Get the LibraryLink includes directory
      $ export WOLFRAM_C_INCLUDES=`wolfram-app-discovery default --raw-value library-link-c-includes-directory`
      
      # Invoke a C compiler and provide the LibraryLink headers location
      $ clang increment.c -I$WOLFRAM_C_INCLUDES -shared -o libincrement

    See docs/CommandLineHelp.md for complete documentation on the wolfram-app-discovery command-line interface.

  • Add /opt/Wolfram/ to list of app search locations used on Linux. (#41)

Changed

Fixed

  • Fix spurious warnings generated on macOS when no Wolfram applications of a particular WolframAppType variant could be discovered. (#37)

  • Fix missing support for Linux in wolfram_app_discovery::build_scripts::wstp_static_library_path() (#40)

    This ought to have been fixed in #28, but copy-pasted code meant the same fix needed to be applied in two places, and only one was fixed in #28.

    This was preventing the wstp-sys crate from compiling on Linux.

0.4.0 — 2022-12-14

Added

  • Added support for app discovery on Linux (#28)

    This address issue #27.

    discover() will now return all Wolfram apps found in the default installation location on Linux (currently just /usr/local/Wolfram/).

    WolframApp::from_app_directory() can now be used to get information on a Wolfram app installed in a non-standard location.

    The following WolframApp methods are now supported on Linux:

  • Added custom logic for determining app metadata, in the absence of an available standard OS-provided format or API. At the moment, this consists of parsing LICENSE.txt and the WolframKernel script for the application type and version number, respectively.

    This is likely more fragile than the implementation methods used on macOS and Windows, but necessary and sufficient for the time being to get discovery working for the most common use-cases. Future improvements are expected.

Changed

Backwards Incompatible

  • Changed the [AppVersion::build_code()] method to return Option<u32> (was u32). (#28)

Fixed

  • Fixed an issue with platform unsupported error generated by WolframApp::installation_directory() incorrectly reporting that the error was in WolframApp::from_app_directory(). (#28)

  • Filled in an erroneously incomplete todo!() in the Display impl for Error. (#28)

0.3.0 – 2022-09-19

Added

  • Add a new wolfram_library_link::build_scripts submodule. (#25)

    Functions from this module will be used by the build.rs scripts of the wstp and wolfram-library-link crates. The current implementation of those scripts relies on calling methods on a WolframApp instance, which means that they don't work when no Wolfram applications are available, even if configuration environment variables are manually set to point at the necessary headers and libraries.

Changed

  • Remove unnecessary warning about embedded Wolfram Player. (#24)

Backwards Incompatible

  • Change WolframApp methods that previously would check an environment variable to check only within the app installation directory. (#25)

    The original usecase for these functions was to get the file paths of the LibraryLink and WSTP header files and compiled libraries, for use in the build.rs scripts of the wstp and wolfram-library-link crates. Because build scripts often need to be configurable to use files from non-default locations, it seemed to make sense to make the WolframApp methods themselves also have behavior configurable by environment variables.

    However, that behavior was both a bit unintuitive to explain and document (If WolframApp represents a specific WL installation, why would its methods ever return paths outside of that app?), and lacked flexibility for the build script usecase.

  • Move the environment variable declarations into their own wolfram_library_link::config::env_vars submodule. (#25)

  • Rename set_print_cargo_build_script_instructions() to set_print_cargo_build_script_directives(). (#25)

0.2.2 – 2022-03-07

Added

  • Improve crate documentation. (#22)

    • Add examples to crate root comment
    • Update and expand on WolframApp::try_default() doc comment.

0.2.1 – 2022-03-02

Added

  • Added Windows support for WolframApp::from_installation_directory(). (#20)

0.2.0 – 2022-02-16

Added

  • Added support for app discovery on Windows (#17)
    • Fixed the wolfram-app-discovery build on Windows
    • Add app discovery logic based on product identifier look-ups in the Windows registry.
    • Improve maintainability of code that branches based on the operating system.

Changed

  • Improve discover() to return apps sorted by version number and feature set (e.g. apps that provide a notebook front end are sorted ahead of those that don't, if the version numbers are otherwise the same). (#18)

Fixed

  • Fixed slow execution of WolframApp::wolfram_version() (1-3 seconds) due to launching a full Wolfram Language kernel process. (#17)

0.1.2 – 2022-02-08

Fixed

  • Fix compilation failure on non-macOS platforms. (#14)

0.1.1 – 2022-02-08

Added

  • Added badges for the crates.io version/link, license, and docs.rs link. (#10)

Changed

  • Changes the README.md summary line to be consistent with the Cargo.toml description field. (#10)

Fixed

  • Fix broken target_system_id() compilation on Linux and Windows that was preventing docs.rs from building the crate. (#10).

0.1.0 – 2022-02-08

Initial release of wolfram-app-discovery.

Added

  • WolframApp, which can be used to query information about installed Wolfram applications:

    use wolfram_app_discovery::WolframApp;
    
    let app = WolframApp::try_default()
      .expect("unable to locate any Wolfram applications");
    
    // Print the $InstallationDirectory of this Wolfram Language installation:
    println!("$InstallationDirectory: {}", app.installation_directory().display());
  • $ wolfram-app-discovery command-line tool:

    $ ./wolfram-app-discovery
    Default Wolfram Language installation:
    
      Product:                     Mathematica
      Wolfram Language version:    13.0.0
      $InstallationDirectory:      /Applications/Mathematica.app/Contents
  • Semi-automatically generated docs/CommandLineHelp.md documentation.