Skip to content

Latest commit

 

History

History
127 lines (87 loc) · 6.07 KB

README.md

File metadata and controls

127 lines (87 loc) · 6.07 KB

Morphir ecosystem submodules

This directory contains git submodules for Morphir ecosystem repositories. The finos/morphir repo uses them to integrate with language and tooling implementations.

Submodules

Submodule Repository Branch Purpose
morphir-elm finos/morphir-elm vnext Reference Elm implementation; IR definition, compilers, visualization, and backend processors
morphir-rust finos/morphir-rust main Rust libraries (morphir-core, morphir-common, etc.) used by the morphir CLI in this repo
morphir-examples finos/morphir-examples main Example Morphir projects; used for docs, tests, and reference
morphir-moonbit finos/morphir-moonbit main MoonBit implementation of Morphir tooling
morphir-python finos/morphir-python main Python implementation of Morphir tooling; owns the Python compiler and the morphir-python WASM extension
morphir-scala finos/morphir-scala main Scala implementation of Morphir tooling; Mill build cross-compiled to JVM, JS, and Scala Native
morphir-ui finos/morphir-ui main Morphir's UI monorepo: the morphir-desktop (Electron) and morphir-web apps sharing one Svelte + Effect application

First-time clone

If you cloned finos/morphir without submodules, initialize everything:

mise run init

This initializes submodules and sets up the development environment. Alternatively, you can initialize just submodules:

mise run submodules:init

Or use git directly:

git submodule update --init --recursive

To clone the repo with submodules in one step:

git clone --recurse-submodules https://github.com/finos/morphir.git

Updating submodules

To update each submodule to the commit currently recorded by the superproject:

mise run submodules:update

To pull the latest from each submodule's remote (for local try-out; the superproject still pins a commit until you commit the new ref):

mise run submodules:pull

Check status of all submodules:

mise run submodules:status

How morphir uses them

  • morphir-elm: The reference implementation containing the IR definition, Elm compiler, visualization components, and backend processors (Scala, JSON Schema, TypeScript, etc.). Tracks the vnext branch and uses mise plus Bun for builds.
  • morphir-rust: The morphir CLI (in crates/) depends on morphir-rust crates via Cargo path dependencies (e.g. morphir-core, morphir-common). The submodule is required to build those crates.
  • morphir-examples: Used for examples, documentation, and tests. See each submodule's own README for build and usage.
  • morphir-moonbit: MoonBit implementation with packages for SDK, core types, and WASM bindings. See below for build commands.
  • morphir-python: Python implementation of Morphir tooling. It owns the Python compiler (the Rust crate rust/crates/morphir-python-binding) and the morphir-python WASM extension that the CLI installs, and releases new extension/python/v<version> bundles. Bundles up to extension/python/v0.4.0 were released from finos/morphir-rust and stay there. The CLI in this repository does not build the extension; CI runs it against the bundle pinned in .config/published-extension-bundles.toml. See the submodule's own README, docs/python-extension.md and docs/python-compiler.md for build and usage.
  • morphir-scala: Scala implementation of Morphir tooling, built with Mill. See below for build commands.
  • morphir-ui: Morphir's UI monorepo — the morphir-desktop (Electron) and morphir-web apps sharing one Svelte + Effect application, with morphir-ir.json browsing, MORPHIR_HOME-backed configuration, and GitHub token capture. Build from within the submodule (it has its own mise toolchain): cd ecosystem/morphir-ui && mise install && bun install && moon run :build (see that repo's README for the full getting-started guide).

Building and testing morphir-moonbit

Build and test MoonBit packages from the repo root:

# Build all packages (wasm and wasm-gc targets)
mise run build:morphir-moonbit

# Build specific package(s)
mise run build:morphir-moonbit -- morphir-sdk
mise run build:morphir-moonbit -- morphir-sdk morphir-core

# Run all tests
mise run test:morphir-moonbit

# Test specific package(s)
mise run test:morphir-moonbit -- morphir-core

Valid package names: morphir-sdk, morphir-core, morphir-moonbit-bindings

Building and testing morphir-scala

morphir-scala is built with Mill using the launcher checked into its own repo. There are no top-level mise tasks for it in finos/morphir — run its tasks from inside the submodule:

cd ecosystem/morphir-scala

mise run lint          # Check formatting
mise run test:jvm      # Run JVM tests
mise run test:js       # Run JS tests
mise run test:native   # Run Scala Native tests
mise run ci:local      # Run full local CI

Mill can also be invoked directly, e.g. ./mill morphir.jvm.compile. See the submodule's own README and CONTRIBUTING for details.

Adding a new submodule

Run:

mise run submodules:add -- <name> [url]

Examples:

mise run submodules:add -- morphir-dotnet
mise run submodules:add -- morphir-elm https://github.com/finos/morphir-elm.git

If url is omitted, it defaults to https://github.com/finos/<name>.git. Then add the new submodule to the table above and to ecosystem/AGENTS.md as needed.

Note: finos/morphir-go is a sibling repository (not currently vendored here). Go tooling development happens there unless it is added as a submodule later.