[−][src]Attribute Macro abi_stable_derive::export_root_module
#[export_root_module]
This attribute is used for functions which export a module in an implementation crate
.
When applied it creates a mangled function which calls the annotated function, as well as check its type signature.
This is applied to functions like this:
ⓘThis example is not tested
use abi_stable::prefix_type::PrefixTypeTrait; #[export_root_module] pub extern "C" fn get_hello_world_mod() -> &'static TextOperationsMod { extern_fn_panic_handling!{ TextOperationsModVal{ reverse_string, }.leak_into_prefix() } }
More examples
For a more detailed example look in the README in the repository for this crate.