ExMaude. Binary
(ExMaude v0.3.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 configpriv/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 bundled binary is available
ExMaude.Binary.bundled?()
#=> true
# Get current platform
ExMaude.Binary.platform()
#=> "darwin-arm64"
Summary
Functions
Checks if a bundled Maude binary is available for the current platform.
Returns the path to the bundled 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 all supported platforms.
Returns the bundled Maude version.
Functions
@spec bundled?() :: boolean()
Checks if a bundled Maude binary is available for the current platform.
@spec bundled_path() :: Path.t() | nil
Returns the path to the bundled Maude binary for the current platform, or nil.
@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 → bundled → 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 all supported platforms.
@spec version() :: String.t()
Returns the bundled Maude version.