-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Description
Hey,
I think we're going to need a way to run any JavaScript safely. This is going to be needed for certain things that are coming into the ecosystem such as AMM's. If we are to run random PST contracts in the browser we need to sandbox the code so it's 100% harmless.
I wanted this to be the start of the discussion on the topic. I have a few ideas so far. Sandboxing can be done in two ways:
- WASM/WASI inherently sandboxes execution. This won't be easy to do though as V8 (NodeJS JavaScript engine) doesn't support compiling to WASM
- Running SmartWeave contracts in its own JS interpreter which can box up the code execution. See an example here: https://github.com/jterrace/js.js
Let me know your thoughts on this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels