[]Macro dart::create_init_function

macro_rules! create_init_function {
    ($crate_name:ident, [$($name:ident),*$(,)?]) => { ... };
}

Creates an appropriate init function given the registerers and final library name.

Usage

  • Create a set of exported functions using export_dart_functions.
  • Pass the export name assigned to in export_dart_functions into this macro, along with the final library name for the correct initialization function name. This will have to match the resulting binary's file name and will be searched for by the Dart VM.
    dart::create_init_function!(library_name, [my_exports]);