Skip to main content

export_handler

Macro export_handler 

Source
macro_rules! export_handler {
    ($ty:ident) => { ... };
    ($ty:ident with_types_in $($path_to_types_root:tt)*) => { ... };
}
Expand description

Generates #[unsafe(no_mangle)] functions to export the specified type as the root implementation of all generated traits.

For more information see the documentation of wit_bindgen::generate!.

struct MyType;

impl Guest for MyType {
    // ...
}

export_handler!(MyType);