Morphir Design Documents

This directory contains design documents for the Morphir daemon and extension system, including current guidance and archived design exploration.

Overview

This directory is organized into two main areas:

  1. Daemon Design - Workspace management, build orchestration, file watching, and CLI-daemon interaction
  2. Extension Design - Extism-backed WASM and process runtimes, MEP, and the task system

Daemon Design Documents

The daemon design documents describe the Morphir daemon architecture for managing workspaces, projects, builds, and IDE integration:

Core Documents

  • README - Daemon overview and architecture
  • Lifecycle - Workspace creation, opening, closing
  • Projects - Project management within a workspace
  • Dependencies - Dependency resolution and caching
  • Build - Build orchestration and diagnostics
  • Watching - File system watching for incremental builds
  • Packages - Package format, registry backends, publishing
  • Configuration - morphir.toml system overview
  • Workspace Config - Multi-project workspace configuration
  • CLI Interaction - CLI-daemon communication and lifecycle

Configuration Documents

  • morphir.toml - Complete configuration file specification
  • Merge Rules - Configuration inheritance and merge behavior
  • Environment - Environment variables and runtime overrides

Extension Design Documents

The extension documents describe the current Extism plus MEP implementation and the separate task-system draft:

Core Documents

  • README - Extension system overview and getting started
  • Tasks - Task system, dependencies, and hooks

The historical WASM Component Model design is excluded from navigation. It preserves rationale from the superseded WIT-based extension proposal and is not an implementation guide.

Key Concepts

Daemon

The Morphir daemon is a long-running service that:

  • Manages workspaces and projects
  • Orchestrates builds in dependency order
  • Watches files for automatic recompilation
  • Provides IDE integration via JSON-RPC
  • Hosts extensions for design-time and runtime use

Extensions

Morphir extensions enable:

  • Custom code generators (new backend targets)
  • Custom frontends (new source languages)
  • Additional tasks (build automation)
  • Protocol integration (JSON-RPC based communication)

Extensions use the same MEP JSON-RPC contract through two runtimes. Process extensions exchange framed messages over standard input and output. WASM extensions run through Extism and have no direct filesystem or network access. The CLI installs either runtime by extension ID from a controlled index.

Design Status

All documents in this directory are marked as draft status and represent the evolving design for the Morphir daemon and extension system. These documents guide implementation work in the morphir-rust repository.

References

Morphir Rust Documentation

Main Morphir Documentation


Table of contents