Skip to main content

Framework Headers And SDK

Morph packages are not just manifest files.

They also consume framework and SDK headers that define the extension surface.


What The SDK Is For

The Morph SDK gives package authors typed ways to describe and implement package behavior.

Examples include:

  • feature interfaces
  • lowering hooks
  • backend host extensions
  • execution descriptors
  • build pipeline descriptors

The SDK exists so packages can own behavior without editing core internals directly.


Important Header Areas

Some key public extension surfaces live under include/morphc/morph/:

Header AreaPurpose
Feature.hfeature-facing SDK concepts
Lowering.hlowering-facing extension surface
MorphABI.hpublic Morph ABI contracts
Execution.hexecution artifact and engine descriptors
Build.hbuild pipeline descriptors
Tooling.htooling command descriptors
BackendHostExtensions.hbackend host capability hooks

When To Use The SDK

Use SDK headers when:

  • the manifest points to a package-owned implementation class or factory
  • a feature needs typed callbacks
  • a provider or route needs framework-defined descriptors
  • build or execution features must register through public APIs

Do not bypass these surfaces by reaching into random internal source files.


When SDK Work Is Needed

Sometimes the existing SDK is too narrow.

That is the correct moment to widen the framework:

  • add a new generic descriptor
  • add a new callback interface
  • add a new host extension point

Then consume that new SDK feature from the package.


Wrong Direction

Do not add one-off feature behavior to core internals when the real issue is that the SDK needs a generic new capability.

If a package author cannot express a behavior through the SDK, fix the SDK. Do not make core the owner of the feature.


Next Steps