Skip to main content

compile

Function compile 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn compile( model: *const c_char, ty: *const c_char, opt: u32, df: *const Defuns, ) -> *const CompilerResult
Expand description

Compiles a model.

  • model is a json string encoding the model.
  • ty is the requested arch (amd, arm, native, or bytecode).
  • opt: compilation options.
  • df: user-defined functions.

ยงSafety

* both model and ty are pointers to null-terminated strings.
* The output is a raw pointer to a CompilerResults.