Skip to main content

Release Notes: v0.4.0-alpha.1

Release Date: January 2026

Alpha Release

This is an alpha release intended for testing and feedback. Some features may be incomplete or subject to change.

Highlights

This release introduces WebAssembly Interface Types (WIT) support with a complete compilation pipeline and JSONL batch processing capabilities.

New Features

WIT Pipeline (morphir wit)

A new command group for working with WebAssembly Interface Types:

morphir wit make - Compile WIT to Morphir IR

Compiles WIT source files or inline source to Morphir IR:

# Compile from file
morphir wit make example.wit -o example.ir.json

# Compile inline source
morphir wit make -s "package a:b; interface foo { x: func(); }"

# Pipe from stdin
cat example.wit | morphir wit make -o out.ir.json

morphir wit build - Full Pipeline

Runs the complete WIT-to-IR-to-WIT pipeline with round-trip validation:

# Full round-trip with validation
morphir wit build example.wit -o regenerated.wit

The build command validates that the conversion is semantically correct by comparing the original and regenerated WIT.

morphir wit gen - Generate WIT from IR

Generate WIT source code from Morphir IR (in development):

morphir wit gen example.ir.json -o example.wit

JSONL Batch Processing

Process multiple sources efficiently with JSON Lines format:

Single-Source JSONL Output

# Get structured JSON output
morphir wit make -s "package a:b; interface foo { x: func(); }" --jsonl

Output:

{"success":true,"typeCount":0,"valueCount":1,"module":{"values":[{"name":"X"}],"sourcePackage":{"namespace":"a","name":"b"}}}

Batch Processing from File

Create a JSONL input file (sources.jsonl):

{"name": "service-api", "source": "package svc:api; interface api { call: func(); }"}
{"name": "data-types", "file": "path/to/types.wit"}

Process all sources:

morphir wit make --jsonl-input sources.jsonl --jsonl

Stdin Batch Processing

echo '{"name": "test", "source": "package a:b; interface foo { x: func(); }"}' | \
morphir wit make --jsonl-input - --jsonl

Diagnostic Codes

The WIT pipeline emits structured diagnostics for lossy type conversions:

CodeSeverityDescription
WIT001WarningInteger precision lost (u8/u16/u32 → Int)
WIT002WarningFloat precision hint lost (f32 → Float)
WIT003ErrorFlags type not supported
WIT004ErrorResource type not supported
WIT005WarningRound-trip produced different output

Output Modes

FlagDescription
--jsonPretty-printed JSON output
--jsonlJSONL output (one JSON object per line)
-v, --verboseShow detailed diagnostics
--warnings-as-errorsTreat warnings as errors
--strictFail on unsupported constructs

Breaking Changes

None - this is a new feature set.

Known Limitations

WIT Type Mapping

Some WIT types have lossy mappings to Morphir IR:

WIT TypeMorphir IRNotes
u8, u16, u32, u64IntSize/signedness lost
s8, s16, s32, s64IntSize information lost
f32FloatPrecision hint lost
flags-Not yet supported
resource-Not yet supported

IR JSON Parsing

The morphir wit gen command currently does not parse IR JSON files. Use morphir wit build for round-trip operations.

Dependencies

This release adds the following new packages:

  • pkg/bindings/wit/pipeline - WIT pipeline steps
  • pkg/bindings/typemap - Type mapping registry

Upgrade Guide

From v0.3.x

No changes required - new features are additive.

Testing Your Upgrade

# Verify installation
morphir about

# Test WIT make
morphir wit make -s "package a:b; interface foo { x: func(); }" --jsonl

# Expected output:
# {"success":true,"typeCount":0,"valueCount":1,...}

Contributors

Thanks to all contributors who made this release possible.

Full Changelog

See CHANGELOG.md for the complete list of changes.