Enable returning &JsValue
from exported functions
#43
Labels
more-types
Adding support for more Rust types to cross the boundary
&JsValue
from exported functions
#43
Right now you can't write a function like:
This is because
JsValue
goes through all the same machinery asFoo
, but I think we want to add a specific trait for "can be returned as a reference" or maybe even justAsRef<JsValue>
as I think that's the only way this can work?Enabling this would help avoid an unnecessary
Clone
otherwise to extract data from wasm back into JS.The text was updated successfully, but these errors were encountered: