finos / finos/morphir

WIT Support: Remaining work for pipeline integration

Open
#480 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
209
Forks
65
Avg merge
8h 55m
Merged PRs (30d)
126

Description

## Overview

This issue tracks the remaining work for complete WIT support in Morphir after the initial bindings module lands (#479).

## Completed Work ✅

The following has been implemented in the `feature/wit-support` branch:

| Beads ID | Description | Status |
|----------|-------------|--------|
| morphir-lex | Scaffold wasm-componentmodel Go module | ✅ Closed |
| morphir-w34 | Define WIT AST/domain model | ✅ Closed |
| morphir-zvf | Add WIT bindings module with parser and package support | ✅ Closed |
| morphir-mpr | Implement WIT package emitter | ✅ Closed |
| morphir-rog | Add BDD fixtures/tests for WIT (WASI) | ✅ Closed |
| morphir-4bi | Implement pure WIT parser | ✅ Closed |

### What's Working
- WIT domain model (Package, Interface, World, TypeDef, Function, etc.)
- Parser adapter from bytecodealliance/wit to Morphir domain model
- **Pure WIT parser** with lexer, parser, and compatibility tests
- WIT text emitter from domain model
- Full type support: primitives, containers, records, variants, enums, flags, resources, handles
- BDD tests with WASI packages as fixtures

## Remaining Work 🚧

### 1. Type Mapping Configuration System (P1) - IN PROGRESS
**Beads ID**: `morphir-77u`

Design and implement a shared type mapping configuration system for all Morphir bindings (WIT, Protocol Buffers, JSON Schema, etc.). This is a foundational design that should be completed before implementing specific binding type mappings.

Requirements:
- Define default type mappings in code
- Allow configuration-based overrides/extensions
- Support bidirectional mappings (external type ↔ Morphir IR)
- Integrate with pipeline configuration (ADR-0002)
- Be reusable across all binding implementations

### 2. WIT Pipeline Adapters (P2)
**Beads ID**: `morphir-jed`
**Blocked by**: morphir-77u

Add frontend/backend adapters that plug WIT parsing/emission into Morphir processing pipelines. This will enable:
- Using WIT as a Morphir frontend (parse WIT → Morphir IR)
- Using WIT as a Morphir backend (Morphir IR → emit WIT)

## Epic Tracking

All WIT work is tracked under epic `morphir-1kp`: **WIT support for wasm component model**

## Related Links
- PR #479: Initial WIT bindings module
- `pkg/bindings/wit/` - WIT bindings module
- `tests/bdd/features/wit/` - BDD feature files

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.