Morphir Rust

Rust tooling for the Morphir ecosystem

View the Project on GitHub finos/morphir-rust

Morphir Rust Documentation

Welcome to the documentation for Morphir Rust - Rust tooling for the Morphir ecosystem.

What is Morphir?

Morphir is a library of tools that work together to solve different use cases. The central idea behind Morphir is that you write your business logic once as a set of Morphir expressions and then consume them in various ways, including:

CLI Commands

Stable Commands

Command Description
ir migrate Convert Morphir IR between format versions
schema Generate JSON Schema for Morphir IR
tool Manage Morphir tools
dist Manage Morphir distributions
extension Manage Morphir extensions

IR Migrate

Convert Morphir IR between format versions (Classic V1-V3 ↔ V4). Supports local files and remote sources.

# Migrate local file to V4
morphir ir migrate --input ./morphir-ir.json --output ./v4.json

# Migrate from remote URL (e.g., the LCR regulatory model)
morphir ir migrate \
    --input https://lcr-interactive.finos.org/server/morphir-ir.json \
    --output ./lcr-v4.json

Experimental Commands

Use morphir --help-all to see experimental commands:

Command Description
validate Validate Morphir IR models
generate Generate code from Morphir IR
transform Transform Morphir IR

Getting Started

Installation

# Using cargo-binstall (recommended)
cargo binstall morphir

# Using mise
mise install morphir

# Or build from source
git clone https://github.com/finos/morphir-rust.git
cd morphir-rust
cargo install --path crates/morphir

Getting Help

# Show help
morphir --help

# Show help including experimental commands
morphir --help-all
morphir help --full
morphir help --experimental

Basic Usage

# Migrate IR to V4 format
morphir ir migrate --input ./morphir-ir.json --output ./v4.json

# Generate JSON Schema for Morphir IR
morphir schema --output ./morphir-ir-schema.json

# Validate a Morphir IR file (experimental)
morphir validate --input ./morphir-ir.json

Contributing

Morphir Rust is part of the FINOS foundation. Contributions are welcome!