Skip to main content

vlib_init_function

Attribute Macro vlib_init_function 

Source
#[vlib_init_function]
Expand description

Marks a function as an VPP plugin init function.

Multiple init functions are supported, but the invocation order is not guaranteed.

ยงExamples


#[vlib_init_function]
fn foo(_vm: &mut BarrierHeldMainRef) -> Result<(), ErrorStack> {
  println!("Hello, world!");
  Ok(())
}