wit_bindgen::examples::_3_world_exports

Macro export

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

Generates #[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!(MyType);