wasm_exec
wasm_exec copied to clipboard
allow namespaces
the original exec comes with a handy namespace. it allows for the addition of trusted extra code
# Dictionary to store definitions from the script
script_namespace = {'myFunction': myFunction}
# Execute the script within the module's namespace
exec(script_content, script_namespace)
it would be handy to allow for extra functions to be imported within the execution context
Hmmmm. I'm not certain as to how implement this. I believe the args passed to the WASM execution environment are converted to string representations. I'll take a look at this further. Thanks for opening this!