vyre-conform 0.1.0

Conformance suite for vyre backends — proves byte-identical output to CPU reference
Documentation
use crate::spec::{EngineInvariant, EngineSpec};

/// CPU reference for the eval engine.
///
/// Input serialization is a custom binary format containing:
/// - programs count, then each program's bytecode
/// - evaluation plan fields
/// - match events
/// - file context
/// - file bytes
///
/// Output: one byte per program (0 or 1 indicating whether it fired).
#[inline]
pub fn cpu_fn(input: &[u8]) -> Vec<u8> {
    match serde::evaluate_from_bytes(input) {
        Ok(fired) => fired.into_iter().map(|b| u8::from(b)).collect(),
        Err(_) => vec![0xFF; 4],
    }
}