pub fn load<S: AsRef<Path>>(source: S) -> Result<LoadedModule, LoadError>Expand description
Load a foreign source file — compiles, generates bindings, returns ready-to-use module.
§Example
ⓘ
use equilibrium::load;
// Simple one-liner
let lib = load("native/math.c")?;
// Access compiled output and bindings
println!("Compiled: {:?}", lib.output_path);
if let Some(code) = lib.bindings_code() {
println!("Bindings: {}", code);
}§Arguments
source- Path to the source file (e.g., “native/v/math.v”)