Skip to main content

link_native_function

Function link_native_function 

Source
pub fn link_native_function(
    _spec: &NativeAbiSpec,
    _native_layouts: &[NativeStructLayoutEntry],
    _library_cache: &mut HashMap<String, Arc<Library>>,
) -> Result<NativeLinkedFunction, String>
Expand description

Phase-2c surface stub. The pre-rebuild body parsed the textual C signature (fn(<params>) -> <ret>), validated cview<...> / cmut<...> / cslice<...> layout references against the program-supplied NativeStructLayoutEntry table, opened the dynamic library via libloading, resolved the symbol, and built a libffi Cif. The signature parser and layout resolver themselves do not touch ValueWord — they’re preserved as a starting point for the phase-2c rebuild. The library opening / symbol resolution path is also kind-independent.