ExMaude. Binary
(ExMaude v0.4.0)
View Source
Maude binary management and platform detection.
This module handles locating and managing Maude executables, with support for:
- Binaries in ExMaude's
priv/maude/bin/(installed viamix maude.install; the git checkout also carries platform binaries there for development — the hex package does not, since Maude is GPL-licensed) - System PATH detection
- Custom path configuration
Fallback Chain
Binary resolution follows this priority:
Application.get_env(:ex_maude, :maude_path)- Explicit configMAUDE_PATH- Environment overridepriv/maude/bin/maude-{platform}orpriv/maude/bin/maude- Local binary (development checkout ormix maude.install)System.find_executable("maude")- System PATH- Raises error with install instructions
Examples
# Get the Maude binary path
ExMaude.Binary.path()
#=> "/path/to/ex_maude/priv/maude/bin/maude-darwin-arm64"
# Check if a local binary is available
ExMaude.Binary.bundled?()
#=> true
# Get current platform
ExMaude.Binary.platform()
#=> "darwin-arm64"
Summary
Functions
Checks whether this installation contains a package-local Maude binary for the current platform.
Returns a package-local Maude binary for the current platform, or nil.
Returns the path to the Maude binary, or nil if not found.
Returns the path to the Maude binary.
Returns the current platform identifier.
Returns the priv directory path for ExMaude.
Checks if the current platform is supported.
Returns platforms that ExMaude can identify and use with a configured, locally installed, or system-provided Maude executable.
Returns the version associated with checkout-local development assets.
Functions
@spec bundled?() :: boolean()
Checks whether this installation contains a package-local Maude binary for the current platform.
@spec bundled_path() :: Path.t() | nil
Returns a package-local Maude binary for the current platform, or nil.
Released Hex packages do not include these GPL-licensed binaries; this helper primarily supports source checkouts and separately installed assets.
@spec find() :: Path.t() | nil
Returns the path to the Maude binary, or nil if not found.
Unlike path/0, this does not raise an error.
@spec path() :: Path.t()
Returns the path to the Maude binary.
Follows the fallback chain: config → environment → local → system → error.
Examples
ExMaude.Binary.path()
#=> "/path/to/maude"
@spec platform() :: String.t()
Returns the current platform identifier.
Examples
ExMaude.Binary.platform()
#=> "darwin-arm64"
@spec priv_dir() :: Path.t()
Returns the priv directory path for ExMaude.
@spec supported_platform?() :: boolean()
Checks if the current platform is supported.
@spec supported_platforms() :: [String.t()]
Returns platforms that ExMaude can identify and use with a configured, locally installed, or system-provided Maude executable.
This is broader than mix maude.install availability. Official stable
Maude release assets currently cover macOS arm64/x64 and Linux x64;
Linux arm64 callers must provide a compatible executable.
@spec version() :: String.t()
Returns the version associated with checkout-local development assets.
Use ExMaude.version/0 to query the interpreter that will actually run.