Function compile_function_to_native_rust
pub fn compile_function_to_native_rust(
source: &str,
target: &str,
) -> Result<Option<AotModule>, ParseError>Expand description
Generate the Rust SOURCE for an AOT-native cdylib of ONE function (HOTSWAP §Axis-3
/ P14b): the target function plus its transitive callees ([crate::codegen::function_slice]),
emitted through the normal ARCHITECT codegen, with the
[crate::codegen::codegen_native_tier_export] shim appended so the loader can
resolve the logos_native_<target> symbol. Mirrors compile_program_full’s
front-end, then slices before codegen.
Returns Ok(None) when target is absent or outside the sound scalar ABI subset —
the caller then keeps that function on VM+JIT (no AOT-native, no gap at the seam).
Err only on a genuine parse/type error in the source.