Skip to main content

verify_against_kernel

Function verify_against_kernel 

Source
pub fn verify_against_kernel(
    binders: &[Binder],
    kernel: &PolydatKernel,
) -> Result<(), Vec<BinderViolation>>
Expand description

Verify binders against a crate::kernel::PolydatKernel directly, returning Ok(()) when every slot’s rvalue→lvalue check passes and Err(Vec<BinderViolation>) listing every failure otherwise.

Convenience wrapper around verify_binders for the common case where the wire-type lookup comes from a polydat kernel the host was handed during dispenser init. A host adapter calls this inline while mapping an op — completing the currying stack — to verify any typed binders before returning the constructed dispenser.

Looks up each binder slot’s wire as either an output or an input of the kernel’s program (outputs are checked first; inputs are the fallback for coordinate/extern wires the op-template kernel auto-externs from outer scope). A wire that resolves to neither surfaces as a “not declared” binder violation rather than silent passthrough.