Expand description
The standard library’s native KERNELS — the ## To native functions of crypto.lg (ML-KEM’s NTT,
sampling, and serialization; the high-level ML-KEM / ML-DSA primitives) — as ONE table every tier
reads.
A ## To native declaration has an EMPTY body: the engine supplies the implementation. The compiled
tier links logicaffeine_system’s kernel (NativeKernel::rust_path); the tree-walker calls
NativeKernel::call; the VM lowers a kernel call to CallBuiltin(NativeKernel) whose first
argument is the kernel’s NativeKernel::code, and the builtin runs the same NativeKernel::call.
So every tier runs the very same Rust function, and a kernel added here reaches all of them at once.
NativeKernel::code is the kernel’s POSITION in NativeKernel::ALL and travels in bytecode (and
the binary wire format), so new kernels are APPENDED — goldens/native_kernel_codes.txt locks it.
Enums§
- Native
Kernel - One native kernel of the standard library.
Functions§
- refuse_
kernel_ calls - The refusal for a backend that lowers compiled bytecode but cannot link the Rust kernels:
Errat the first kernel call that can RUN (named when its code is a constant, as the VM compiler emits it). A kernel in a function nothing reaches is code the loader spliced in and nothing calls, so it refuses nothing —crate::vm::reachis the same answer the backends lower by. - refuse_
kernel_ calls_ with refuse_kernel_calls, judging what the host’s ownentriesreach as well as Main — the same roots a module built with those entries lowers.