Skip to content

[EPIC] Morphir Wasm Extension System - Future Work #44

@DamianReeves

Description

@DamianReeves

Morphir Wasm Extension System - Status and Future Work

This issue tracks the completion of the Morphir Wasm extension system. The core architecture is implemented and verified, and we are now moving into daemon integration and registry implementation.

📝 Implementation Plan Context

Implemented a unified architecture for executing Morphir extensions using WebAssembly (Wasmtime 41.0), Kameo actors, and a content-type envelope protocol.

  • Phase 1: Envelope Protocol + Core ABI (morphir-ext-core) - COMPLETED
  • Phase 2: Component Model WIT definitions - COMPLETED
  • Phase 3: Host Runtime Implementation (morphir-ext) - COMPLETED
  • Phase 4: Kameo Actor Integration - COMPLETED

🏗️ Core ABI Integration Details

The system supports a hybrid WASI architecture:

  • Host: WASI Preview 2 (Component Model).
  • Guest: Can be Preview 1 (via shims) or 'unknown-unknown' (pure logic).
  • Communication: Uses a (pointer, length) convention for JSON-serialized Headers and raw byte Envelopes.
  • Reference: Detailed ABI spec can be found in docs/extensions/DEVELOPMENT.md.

✅ Completed Tasks

  • Create morphir-ext-core crate and define Envelope ABI.
  • Define WIT interfaces (envelope.wit, program.wit, runtime.wit).
  • Implement MorphirHost for WASI P2 and Morphir Runtime.
  • Create ExtensionRuntime and ExtensionActor.
  • Implement sample extension and integration test suite.
  • Documentation for multi-language development (TS, Python, Go).

🚀 Remaining Work & Beads Mapping

Progress is tracked locally using Beads (bd).

Task Beads ID Status
Integrate with daemon crate \morphir-rust-idm\ OPEN
Integrate Morphir Daemon with CLI \morphir-rust-xpd\ CLAIMED
Add extension registry/discovery \morphir-rust-hkr\ OPEN

🔍 Walkthrough Summary

The system enables pluggable, high-performance, and secure extensions for the Morphir project. Verification confirmed the TEA (The Elm Architecture) loop execution within the local Wasm runtime using on-the-fly component encoding.


Context automatically generated from local development artifacts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions