vyre-conform 0.1.0

Conformance suite for vyre backends — proves byte-identical output to CPU reference
Documentation
//! Canonical spec-layer operation declarations.
//!
//! Runtime operation registration lives in the operation implementation layer. This module is
//! the proof- and generator-facing layer: it keeps the enriched `OpSpec`
//! entries that coverage checks can enumerate without depending on runtime
//! registry construction.

use crate::OpSpec;

/// Add module.
pub mod add;

/// Shared operation-spec reference type for registry-style enumeration.
pub type OpSpecRef = OpSpec;

/// Executable hooks supplied by the specs layer for spec-layer operations.
#[derive(Clone, Copy)]
pub struct OpSpecSources {
    /// Runtime hooks for `primitive.math.add`.
    pub add: add::AddSpecSource,
}

/// Return every canonical spec-layer operation.
///
/// Phase 1.4 registry coverage uses this list to find spec-layer entries that
/// have opted into the complete metadata contract. Add is intentionally first:
/// it is the authoring template every other op should copy from.
#[inline]
pub fn all(sources: OpSpecSources) -> Box<[OpSpecRef]> {
    vec![add::spec(sources.add)].into_boxed_slice()
}