This repository publishes the Morphir CLI as a prebuilt executable for Linux, macOS, and Windows. Both x86-64 and ARM64 packages are available.
mise can download the correct executable from the Morphir GitHub release for your operating system and processor.
Install the current prerelease globally:
mise use -g github:finos/morphir@0.4.0-beta.9To pin Morphir in a project's mise.toml, add:
[tools]
"github:finos/morphir" = "0.4.0-beta.9"Run mise install after changing the configuration. Prereleases must be
selected explicitly. A request for latest does not select them by default.
Check the installation:
morphir versionDownload the archive for your system from GitHub Releases.
| System | Processor | Asset suffix |
|---|---|---|
| Linux | x86-64 | x86_64-unknown-linux-gnu.tgz |
| Linux | ARM64 | aarch64-unknown-linux-gnu.tgz |
| macOS | Intel | x86_64-apple-darwin.tgz |
| macOS | Apple silicon | aarch64-apple-darwin.tgz |
| Windows | x86-64 | x86_64-pc-windows-msvc.zip |
| Windows | ARM64 | aarch64-pc-windows-msvc.zip |
Each archive contains one executable named morphir, or morphir.exe on
Windows. Extract it and move it to a directory on PATH.
Linux and macOS:
mkdir -p "$HOME/.local/bin"
tar -xzf morphir-<version>-<target>.tgz
install -m 0755 morphir "$HOME/.local/bin/morphir"Windows PowerShell:
Expand-Archive morphir-<version>-<target>.zip
Move-Item .\morphir.exe $env:LOCALAPPDATA\Microsoft\WindowsApps\morphir.exeThe release also includes a .sha256 file for every archive. Verify the
download before extracting it:
# Linux
sha256sum -c morphir-<version>-<target>.tgz.sha256
# macOS
shasum -a 256 -c morphir-<version>-<target>.tgz.sha256$expected = (Get-Content morphir-<version>-<target>.zip.sha256).Split()[0]
$actual = (Get-FileHash morphir-<version>-<target>.zip -Algorithm SHA256).Hash
if ($actual -ne $expected) { throw "Checksum verification failed" }The CLI ships separately from language extensions. With CLI 0.4.0-beta.7 or
later, install the morphir-python WASM bundle extension/python/v0.4.0 to compile
supported Python ADTs, fixed tuples, conditional functions, typed calls and unary
lambdas to Morphir IR v3 or v4 and generate Python. Its version-2 descriptor needs
CLI 0.4.0-beta.7 to publish; with CLI 0.4.0-beta.1 to 0.4.0-beta.6, use
extension/python/v0.3.0. The earlier v0.1.0 bundle does not compile with this CLI.
See the Python extension installation guide
for download, repository publication and installation commands, and the
binding README
for the supported subset and conformance limits.
Building from source requires Git, mise, and the platform build tools required by Rust.
git clone --recurse-submodules https://github.com/finos/morphir.git
cd morphir
mise install
cargo build --locked --release --package morphirThe executable is written to target/release/morphir on Linux and macOS, or
target\release\morphir.exe on Windows.
cargo build, cargo test, and cargo clippy fail on Windows with this error if your
Visual Studio install is missing an optional component:
error: failed to run custom build command for `msvc_spectre_libs v0.1.3`
cargo:warning=No spectre-mitigated libs were found. Please modify the VS Installation to add these.
thread 'main' panicked at msvc_spectre_libs-0.1.3/build.rs:38:13:
No spectre-mitigated libs were found. Please modify the VS Installation to add these.
The CLI's embedded Rego evaluator (morphir-opa, via regorus) depends on the
msvc_spectre_libs crate, which requires the Spectre-mitigated MSVC libraries.
Either install the "MSVC v143 - VS 2022 C++ x64/x86 Spectre-mitigated libs
(Latest)" component from the Visual Studio Installer, or skip it entirely with
cargo build --no-default-features --package morphir, which drops regorus from
the dependency graph (and disables morphir eval's Rego provider along with
itest's Rego-backed assertions). See DEVELOPING.md
for the elevated-install one-liner and issue #886
for the full analysis.