vyre-driver 0.7.2

Driver layer: registry, runtime, pipeline, routing, diagnostics. Substrate-agnostic backend machinery. Part of the vyre GPU compiler.
Documentation
//! Backend capability traits.

use super::VyreBackend;
use std::collections::HashSet;
use vyre_foundation::ir::OpId;

/// Minimal backend identity and capability contract.
pub trait Backend: Send + Sync {
    /// Stable backend identifier.
    fn id(&self) -> &'static str;
    /// Backend implementation version.
    fn version(&self) -> &'static str;
    /// Operation ids this backend can execute without further lowering.
    fn supported_ops(&self) -> &HashSet<OpId>;
}

impl<T: VyreBackend + ?Sized> Backend for T {
    fn id(&self) -> &'static str {
        VyreBackend::id(self)
    }

    fn version(&self) -> &'static str {
        VyreBackend::version(self)
    }

    fn supported_ops(&self) -> &HashSet<OpId> {
        VyreBackend::supported_ops(self)
    }
}