pub fn codegen_native_tier_export(
name: Symbol,
params: &[(Symbol, &TypeExpr<'_>)],
return_type: Option<&TypeExpr<'_>>,
interner: &Interner,
) -> Option<String>Expand description
Emit the AOT-native export shim (HOTSWAP §Axis-3): a thin #[no_mangle] extern "C"
calling-convention wrapper over the inner Rust fn that crosses our ACTUAL values —
scalars BY VALUE — with NO CString/handle marshaling (unlike
[codegen_c_export_with_marshaling]). The interpreter marshals VM Values to these
scalar args, calls the loaded symbol, and re-boxes the scalar result.
Returns None unless every param AND the return are in the sound scalar subset
([is_native_scalar]): the caller then falls through to VM+JIT, so a function the
shim cannot represent simply isn’t AOT-native — no gap at the seam.