Skip to main content

__export_capsule_impl

Macro __export_capsule_impl 

Source
macro_rules! __export_capsule_impl {
    ($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!(MyType);