implement_bitcode_module

Macro implement_bitcode_module 

Source
macro_rules! implement_bitcode_module {
    ($handler_name:literal, $handler_func:ident $(, $more_lit:literal, $more:ident)*) => { ... };
}
Expand description

This macro delivers the required initializtion of the eluvio wasm module In addition the macro also registers a handler of the form

fn fn_name<'s, 'r>(bcc: &'s mut elvwasm::BitcodeContext<'r>) -> CallResult

implement_bitcode_module!("proxy", do_proxy, "image", do_image);
fn do_proxy<'s, 'r>(bcc: &'s mut elvwasm::BitcodeContext<'r>) -> CallResult {
  return bcc.make_success("SUCCESS");
}
fn do_image<'s, 'r>(bcc: &'s mut elvwasm::BitcodeContext<'r>) -> CallResult {
  return bcc.make_success("SUCCESS");
}