Struct datafusion_jit::api::Assembler
source · pub struct Assembler { /* private fields */ }
Expand description
The very first step for constructing a function at runtime.
Implementations§
source§impl Assembler
impl Assembler
sourcepub fn register_extern_fn(
&self,
name: impl Into<String>,
ptr: *const u8,
params: Vec<JITType>,
returns: Option<JITType>
) -> Result<()>
pub fn register_extern_fn( &self, name: impl Into<String>, ptr: *const u8, params: Vec<JITType>, returns: Option<JITType> ) -> Result<()>
Register an external Rust function to make it accessible by runtime generated functions. Parameters and return types are used to impose type safety while constructing an AST.
sourcepub fn new_func_builder(&self, name: impl Into<String>) -> FunctionBuilder
pub fn new_func_builder(&self, name: impl Into<String>) -> FunctionBuilder
Create a new FunctionBuilder with name
prefix
sourcepub fn create_jit(&self) -> JIT
pub fn create_jit(&self) -> JIT
Create JIT env which we could compile the AST of constructed function into runnable code.