vyre-driver
Backend-neutral artifact materialization, typed binding, submission, completion, capability, and lower-level dispatch contracts for Vyre.
Production execution enters this crate after whole-program compilation:
Artifact + authenticated TargetPayload
-> registered ArtifactMaterializer
-> ArtifactInstance
-> BindingSet
-> Submission
-> Completion
vyre-megakernel owns artifact identity and pure target compilation. Concrete
driver crates own target formats, device acquisition, materialization, native
modules, and submission mechanics.
Invariants
ArtifactMaterializeradmits immutable authenticated target bytes for one device generation.ArtifactInstanceaccepts only bindings carrying its artifact digest.BindingSetseparates immutable artifact identity from runtime invocation geometry and resident resource selection.- Device loss invalidates native modules and resident handles from that generation. Recovery rematerializes target bytes without re-lowering.
- Backend operation support derives from the foundation semantic operation registry.
- Direct
Programdispatch is a lower-level oracle, capability, and driver testing surface. Production callers use artifacts.
Boundaries
vyre-driver owns:
BackendRegistrationand registered compiler/materializer facets;ArtifactMaterializer,ArtifactInstance,BindingSet,Submission, andCompletion;- backend-neutral device identity, capability, resident-resource, validation, scheduling, and diagnostic contracts;
VyreBackend,DispatchConfig, and direct dispatch for intentional lower-level consumers.
Concrete driver crates own runtime objects, target code generation, target formats, device probes, native executable modules, and target-specific terminology.
The public vyre facade does not re-export backend implementation traits,
dispatch configuration, compiled-pipeline handles, or the backend registry.
Import those contracts from vyre-driver only when using the lower-level
driver surface intentionally.
Registered artifact execution
use backend_registration;
use ;
let registration = backend_registration?;
let compiler = registration.target_compiler?;
let payload = compiler.compile?;
let materializer = registration.materializer?;
let instance = materializer.materialize?;
let mut bindings = new;
bindings.insert;
let completion = instance.submit?.wait?;
Use vyre-runtime::ArtifactSession when runtime compilation, target attachment,
admission, recovery, or persistence orchestration is required.
Extension guide: adding a new backend
- Create one concrete driver crate. Shared crates must not depend on it.
- Implement a pure
TargetCompilerthat consumes compiler-selected artifact modules and emits immutable target bytes. - Implement
ArtifactMaterializerto authenticate the payload, acquire native handles for one device generation, and return anArtifactInstance. - Register the backend factory, operation support, compiler facet, and
materializer facet in one
BackendRegistration. - Register target operation facets through the foundation semantic operation registry.
- Prove compile, materialize, typed submission, readback, device-loss rematerialization, and reference parity through the conformance engine.
See src/backend/artifact_lifecycle.rs, src/backend/registry/, and
vyre-megakernel::target for the contracts. See docs/targets.md
for the production lifecycle and extension checklist.
Crate contract
This section is generated by python3 scripts/crate_readmes.py --write from
the crate manifest, release train, ownership registry, and crate-guide metadata.
Purpose
Define backend-neutral device, target compiler registration, artifact materialization, binding, submission, completion, capability, dispatch, and evidence contracts.
Boundaries
The backend-contract owner maintains this backend-neutral crate at vyre-driver.
Its allowed internal production dependencies are: vyre-foundation, vyre-macros, vyre-megakernel, vyre-self-substrate, vyre-spec.
Any other normal or build dependency requires an ownership-registry change.
Minimal real example
Run the checked-in behavior from vyre-driver/examples/vyre_driver_release_surface.rs:
CARGO_BUILD_JOBS=1 ./cargo_full run -p vyre-driver --example vyre_driver_release_surface
Features
- Manifest features:
default,self-substrate-adapters - Default feature members: None
Errors and unsupported behavior
Backend acquisition, capability, artifact, dispatch, and lifecycle failures retain actionable context. Shared contracts never substitute a concrete backend silently.
Testing
Use docs/testing/vyre-driver.md for exact commands, Cargo targets, hardware
requirements, evidence outputs, expected skips, and failure semantics.
Release status
vyre-driver@0.7.2 is a publishable crate on the current Vyre release train. Publication still requires the release evidence and user-approval gates.
Ownership
docs/CRATE_OWNERSHIP.toml is authoritative for this crate's responsibility
and allowed internal edges. Regenerate docs/CRATE_GRAPH.md and
docs/OWNERSHIP.md after changing that registry.
License
Licensed under either of
- Apache License, Version 2.0, or
- MIT license
at your option. See the workspace LICENSE-APACHE and LICENSE-MIT files.