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

Introducing script type="dummy" #110

Merged
merged 2 commits into from
Jul 29, 2024
Merged

Introducing script type="dummy" #110

merged 2 commits into from
Jul 29, 2024

Conversation

WebReflection
Copy link
Contributor

As explained in here to @ntoll pyscript/pyscript#2128 (comment)

it'd be great to have a dummy zero-runtime interpreter that we could use to:

  • test interpreters capabilities
  • bootstrap convoluted logic that require an interpreter without penalizing performance and without bothering the network at all
  • use to just demo polyscript (or PyScript) abilities directly via JS

This MR brings the dummy module in a way that:

  • it's minimalistic in size and implementation
  • it brings without needing to trash stuff on the global context a module system (require(name) borrowed from CommonJS)
  • it's tested and it works great ... we can use it in the current PyScript MR too to avoid bootstrapping MicroPython instead so it'd be instantaneous

@ntoll happy to approve?

@WebReflection WebReflection requested a review from ntoll July 29, 2024 13:45
@WebReflection
Copy link
Contributor Author

before anyone asks ... using js is not a great idea because we have QuickJS and we could have any other real WASM sandbox that could use the name js so I don't feel too comfortable in using such name for the interpreter as there's nothing happening if not just code evaluation but we could have that name reserved for the future to do greater / better things.

@WebReflection WebReflection merged commit 00532f1 into main Jul 29, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants