vyre-reference 0.1.0

Pure-Rust CPU reference interpreter for vyre IR — byte-identical oracle for backend conformance and small-data fallback
Documentation
//! Dual CPU references for `primitive.bitwise.xor`.

use crate::dual::DualReference;
use vyre::ops::primitive::bitwise::xor::Xor;

/// Operation ID for the XOR primitive — re-exports the canonical id from the op's `OpSpec`
/// so the two never drift. If the op's id changes, this constant changes in the same commit.
pub const OP_ID: &str = Xor::SPEC.id();

/// Direct word-oriented XOR reference.
pub mod reference_a;
/// Bit-by-bit XOR reference.
pub mod reference_b;

/// Dual-reference marker for the XOR primitive.
pub struct XorDualReference;

impl DualReference for XorDualReference {
    fn reference_a(input: &[u8]) -> Vec<u8> {
        reference_a::reference(input)
    }

    fn reference_b(input: &[u8]) -> Vec<u8> {
        reference_b::reference(input)
    }
}