[][src]Function dqcsim::bindings::dqcs_plugin_run

#[no_mangle]pub extern "C" fn dqcs_plugin_run(
    pdef: dqcs_handle_t,
    simulator: *const c_char
) -> dqcs_return_t

Executes a plugin in the current thread.

pdef must be an appropriately populated plugin definition object. Its callback functions will be called from the current thread, from within the context of this function.

simulator must be set to the address of our endpoint of the simulator that's using the plugin; DQCsim normally passes this as the first command line argument of the plugin process.

If the plugin starts, the pdef handle is consumed by this function, regardless of whether the plugin eventually closes normally. The handle is only left alive if pdef is not a plugin definition object.