use fp_bindgen::prelude::Serializable;
#[derive(Serializable)]
#[fp(rust_module = "my_crate::prelude")]
pub struct MyStruct {
pub foo: i32,
pub bar_qux: String,
}
> In this example, MyStruct has a double function: it acts both as a type
definition for the protocol (through fp-bindgen's Serializable trait), which
can still be used for generating a TypeScript type definition, for instance.
And it acts as a type that can be directly used by the Rust Wasmer runtime,
under the assumption the runtime can import it from my_crate::prelude.