wrap-cli icon indicating copy to clipboard operation
wrap-cli copied to clipboard

Map wasm return types to schema in the bindings

Open fetsorn opened this issue 3 years ago • 0 comments

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.

fetsorn avatar Sep 30 '22 18:09 fetsorn