component

Attribute Macro component 

Source
#[component]
Expand description

Generates the WIT interface and storage metadata.

NOTE: Mark each type used in the public method with #[export_type] attribute macro.

To disable WIT interface generation:

  • don’t use #[component] attribute macro in the impl MyAccountType section;

To use manually crafted WIT interface:

  • put WIT interface file in the wit folder;
  • call miden::generate!(); and bindings::export!(MyAccountType);
  • implement impl Guest for MyAccountType;