Morphir Design Documents

This directory contains design documents for the Morphir daemon and extension system, covering architecture, protocols, and implementation details.

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 - WASM component model, extension interfaces, and 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 design documents describe the architecture for adding capabilities to Morphir via WASM components and the task system:

Core Documents

  • README - Extension system overview and getting started
  • WASM Components - Component model integration and WIT interfaces
  • Tasks - Task system, dependencies, and hooks

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 are implemented as:

  • WASM Components - Sandboxed WebAssembly components using the Component Model
  • Native Executables - JSON-RPC over stdio executables
  • Packages - Distributable bundles with manifest

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