Providers And Artifacts
Providers are one of the main ways packages compose execution and backend behavior.
What A Provider Is
A provider is a package-owned capability that other packages can import and target.
Examples include:
- host LLVM providers
- GPU route providers
- shader providers
Providers make capabilities explicit instead of hiding them in global branches.
Provider IDs
Provider relationships are declared with explicit IDs such as:
provider.core.host_llvm
provider.gpu.vulkan
provider.shader.spirv
These IDs let packages say exactly what they need.
Artifacts
Providers usually expose or consume artifact kinds as part of route resolution.
Real examples include:
host.llvm_valuehost.nir_valueshader.expression
An artifact kind tells the framework what sort of thing a route produces or expects.
Concrete manifest wiring (real pattern)
In real packages you typically see provider IDs in two places:
- Package root
morph.toml: import/export provider edges across packages. - Feature
feature.toml: route declarations that target a provider and declare the produced artifact kind.
Example (provider export, morphs/GPU/morph.toml):
[export.gpuvulkan]
kind = "provider"
id = "provider.gpu.vulkan"
provider = "provider.gpu.vulkan"
Example (provider-targeted route, morphs/Core/features/api/feature.toml):
[core.input.route.hostllvm]
provider_id = "provider.core.host_llvm"
route_id = "host.llvm"
artifact_kind = "host.llvm_value"
required_extensions = ["llvm.base.v1", "llvm.runtime_import.v1"]
required_runtime_families = ["io"]
source = "features/Input/backend/routes/host.llvm/Emit.cpp"
component_class = "core.input.backend.hostllvm"
This is the “typed edge” idea from the framework chapters: provider + route id + artifact kind + requirements + emit source.
Why Artifacts Matter
Artifact kinds stop route wiring from becoming vague.
Instead of saying "this backend somehow handles it," Morph can say:
- which provider handles it
- which artifact kind is produced
- which later stage can consume it
This is essential for explicit discovery and package composition.
Provider Ownership Rule
If a package needs a provider:
- declare it through package imports
- reference it in package feature metadata
- keep the consuming route logic in the package
Do not hardcode provider selection in core source files.
Next Steps
- LLVM Route Signatures - provider and artifact details for LLVM-backed routes
- Native Providers And Host Interop - how host-facing provider boundaries fit the same model
- Runtime Families - the runtime side of route requirements