finos / finos/morphir-rust

[EPIC] Morphir Wasm Extension System - Future Work

Open
#44 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2
Forks
0
Avg merge
5h 15m
Merged PRs (30d)
69

Description

# 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](docs/extensions/DEVELOPMENT.md).

## ✅ Completed Tasks
- [x] Create morphir-ext-core crate and define Envelope ABI.
- [x] Define WIT interfaces (envelope.wit, program.wit, runtime.wit).
- [x] Implement MorphirHost for WASI P2 and Morphir Runtime.
- [x] Create ExtensionRuntime and ExtensionActor.
- [x] Implement sample extension and integration test suite.
- [x] 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.*

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.