Skip to main content

Runtime Families

Runtime families are how packages declare runtime capabilities they require or provide.


What A Runtime Family Is

A runtime family is a named runtime capability that a feature or route can depend on.

Examples already visible in package metadata include:

  • io
  • print
  • tensor
  • graphics

Why Runtime Families Exist

Without runtime families, backend and lowering code tend to assume runtime support is magically available.

Runtime family metadata makes that dependency explicit.

This improves:

  • package clarity
  • route validation
  • build/runtime closure calculation
  • failure diagnostics

Where They Appear

Runtime family relationships usually appear in:

  • package runtime metadata
  • feature route declarations
  • backend requirements such as required_runtime_families

That lets the Morph graph calculate what runtime behavior must be present.


How packages declare families and bundles

The authoritative declarations live in package morphs/<Package>/morph.toml:

  • morphs/Core/morph.toml declares families like io, print, runtime, module with *.symbol.* entries containing llvm_signature and native_symbol.
  • morphs/GPU/morph.toml declares a gpu family and runtime bundles (shared + web).
  • morphs/Wasm/morph.toml declares a runtime.bundle.web that pulls Web platform sources under morphs/Wasm/runtime/platform/*.

Routes then declare they depend on them using required_runtime_families = ["io"] (or ["tensor"], ["graphics"], …) inside feature.toml.


Package Ownership Rule

If a package owns a runtime family:

  • the runtime implementation stays with the package
  • the declaration stays in package metadata
  • consumers declare their requirement explicitly

Do not put domain runtime ownership into the generic runtime kernel.


Example

If a tensor route needs runtime support:

required_runtime_families = ["tensor"]

That is better than hiding the requirement inside backend source code.


Next Steps