Skip to main content

module

Attribute Macro module 

Source
#[module]
Expand description

Mark an inline mod as an exported WeaveFFI namespace.

The macro validates the module tree with the same rules the CLI applies to an IDL, re-emits the module, and appends the generated C ABI thunks for every tagged item it contains, recursing into nested #[weaveffi::module] submodules (whose symbols carry the joined module path). A #[cfg] on an exported item applies to its thunks too. A top-level module also exports {prefix}_{module}_contract(), the contract table generated bindings verify when they load the library.