Skip to main content

validate_call_export

Function validate_call_export 

Source
pub fn validate_call_export(
    surface: &ApiSurface,
    module_path: &str,
    function_name: &str,
) -> ExportValidation
Expand description

Validate that a (module_path, function_name) pair from alef.toml resolves to a function whose rust_path matches "{module_path}::{function_name}".

This catches two bug classes:

  • C1 – the declared module does not match the actual export path (e.g., the instead of sample_core/render_page examples inherited from consumers. function is defined at sample_core::rendering::render_page but alef.toml uses module = "sample_core", and render_page is NOT re-exported at the crate root).
  • C2 – multiple definitions exist; the one with the wrong rust_path was kept by the dedup pass, causing the wrong signature to be used.

Pass module_path = "sample_core" and function_name = "render_page" to check that sample_core::render_page exists in the surface.