Attribute Macro ark_api_macros::ark_bindgen[][src]

#[ark_bindgen]
Expand description

Replaces a mod block by another one that augments type/struct/external function declarations to make them more concise, ergonomic and pleasant to use.

In particular, generates an HostShim trait that is implemented partially automatically thanks to the host_exports macro above.

Note this macro is designed to be used in WebAssembly code (creating a safe Rust module that can used directly) and on the host (creating the trait that will be implemented by the above macro).

See the crate description for examples of what you can do with it.

This unfortunately can’t be applied at module scope yet; see also https://github.com/rust-lang/rust/issues/54726.