Expand description
High-level helper to define a Cranelift function: declares the function,
creates the FunctionBuilderContext + entry block, runs the user-supplied
body closure to populate the IR, emits the return, and finalizes.
The body closure receives &mut FunctionBuilder, &mut Module, and the
entry-block parameters. It returns the values to be returned, via the
IntoReturns trait — so (), a single Value, [Value; N], or
Vec<Value> all work without ceremony.
Traits§
- Into
Returns - Conversion from common Rust shapes to a return-Value list.
Functions§
- define_
function - Declare and define a Cranelift function in one call.