wrap-cli
wrap-cli copied to clipboard
Map wasm return types to schema in the bindings
Is your feature request related to a problem? Please describe. While developing the Ethereum rust wrapper I needed to map several record types from rust to record types from our schema bindings. Rust field types like hashes, big numbers, addresses, bytes, all had to to be converted to strings, and wasm-rs::BigInt.
Describe the solution you'd like Perhaps we could make the mapping easier by enriching bindings. Perhaps by adding some "Into" trait implementations. So that any wasm function return type is valid as long as it can be cast into a String or a u32.