pub trait PureKernel { }Expand description
ST-132: a marker trait, no methods. A ProcessKernelFn/ProcessFn
implementation that also implements PureKernel is asserting the
contract ST-132 requires: it is derivable purely from (base, ctx), with
no other mutable state (no hidden thread-local/global) reachable from
inside it. This crate cannot compel a compiled kernel to implement this
trait (CODEGEN’s own IR emitter, out of this wave’s scope, would need a
#[forbid(...)]-style procedural check for a compiler-level guarantee) —
STATE’s own enforcement mechanism this wave is the structural lint test
below: proving that nothing STATE itself exposes to a kernel author
encourages violating the contract (no STATE-owned API hands out a
thread-local or global mutable handle a kernel could close over instead
of going through (base, ctx)).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".