This code executes just fine as in the unwraps do not panic, but bound_function is an exception and when I dump the error it essentially says this: TypeError: not a function at bind (native).
I am trying to pass some dynamic data into a function created dynamically in Rust, and it seems the only way I can really do this is through the this_val, thus I am trying to set it. A closure will not work because of a wasmwedge-quickjs assertion that seems to panic whenever the JsFunction closure captures any of its environment.
Here's some example code:
This code executes just fine as in the unwraps do not panic, but
bound_function
is an exception and when I dump the error it essentially says this:TypeError: not a function at bind (native)
.I am trying to pass some dynamic data into a function created dynamically in Rust, and it seems the only way I can really do this is through the
this_val
, thus I am trying to set it. A closure will not work because of a wasmwedge-quickjs assertion that seems to panic whenever theJsFunction
closure captures any of its environment.