Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow namespaces #23

Open
chris-aeviator opened this issue Jan 20, 2024 · 1 comment
Open

allow namespaces #23

chris-aeviator opened this issue Jan 20, 2024 · 1 comment
Assignees

Comments

@chris-aeviator
Copy link

chris-aeviator commented Jan 20, 2024

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

@Jflick58 Jflick58 self-assigned this Jan 24, 2024
@Jflick58
Copy link
Owner

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants