ursalang / ursa

A friendly, stable general-purpose programming language
https://ursalang.github.io
3 stars 1 forks source link

Use `vm.Script` for eval #50

Open rrthomas opened 6 months ago

rrthomas commented 6 months ago

The obstacle to doing this was that vm.Script does not currently support sourcemaps, so that for backtraces we will have to filter manually. But we need better control of evaluation context, both to have some semblance of security, and in particular to have access to externalSyms so we can properly control access in JavaScript.

rrthomas commented 1 month ago

I opened the following issue about this: https://github.com/nodejs/node/issues/52102 and there's an approved PR to fix it that as of this writing needs rebasing.