macro_rules! export_runtime {
() => { ... };
}Expand description
Emit #[no_mangle] extern "C" thunks for every runtime symbol that
the WeaveFFI generators expect to find in the consuming cdylib.
The macro expands to a fixed set of functions named with the
weaveffi_ prefix:
weaveffi_free_stringweaveffi_free_bytesweaveffi_error_clearweaveffi_cancel_token_createweaveffi_cancel_token_cancelweaveffi_cancel_token_is_cancelledweaveffi_cancel_token_destroy
§Example
ⓘ
// Inside a cdylib's src/lib.rs
use weaveffi_abi as abi;
abi::export_runtime!();
// ... your generated/hand-written #[no_mangle] business functions ...Invoke this macro at module scope exactly once in your cdylib. Multiple invocations would produce duplicate symbol definitions.