Open killercup opened 7 years ago
Tried that in
and
but the data I get is not a (ptr, len)
I can understand.
Also, a fn that return a fat point/String does so by writing to an out argument, i.e., you pass in a ptr to an allocation the size of the return value on the stack. So, we need to extend wrap
to be able to deal with adding this argument to the WASM call.
&str
as argument&str
as return typeString
as argumentString
as return typeApproach:
(data, len)
or(data, len, cap)