-
Notifications
You must be signed in to change notification settings - Fork 651
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
Feature Request: local eval
for SES (Secure EcmaScript) support
#957
Comments
eval
for React Native SES (Secure EcmaScript) supporteval
for SES (Secure EcmaScript) support
We have planned support for local eval() in one of the next major releases of Hermes. However please note that the performance will suffer greatly. |
that's great appreciate the update ^ and noted RE the perf consideration |
sry @tmikov couple more questions, are there any plans on Module Harmony / Compartments / Lockdown / Harden? since we're only using/wanting direct eval to build Compartments |
@leotm to my embarrassment, I have to profess my ignorance and admit that I haven't really followed SES closely. Frankly, at this point Hermes has gaps in EcmaScript compliance that have to be dealt with first, so Compartments and others that are still in the proposal stage haven't been on our radar. We need local We have no plans to support non-strict local Fundamentally, Hermes was designed to be a minimalistic and efficient AOT compiler. We work best when we can access all source ahead of time, when we have static visibility into the module system (for cross-module inlining), etc. Very dynamic runtime behaviors are not really compatible with our charter. Early on we decided that we can't support every use case, because then we would just be re-implementing v8, badly. In order to offer a meaningful alternative to mainstream engines, we have to focus on the use cases where we can provide an improvement (fast startup, small binary, less memory, etc). In the next major version we will also offer a dramatic perf improvement for a certain set of use cases, but not all. I took a quick look at https://github.com/tc39/proposal-compartments. A very cursory read makes me believe that compartments require a great deal of runtime dynamic behavior. Is that really the case? |
😄 gotcha makes sense RE the EcmaScript compliance priorities ^ still good news for local but we have an idea (proposal of a proposal?) without |
cc @erights @kriskowal will be able to answer better than i can |
FWIW, I think we might be able to add support for |
many years in the deprecation 😅 but yes covering most of test262 would indeed |
Problem
Hey there, Leo here from team LavaMoat and MetaMask 👋
i'm working with the folks at EndoJS bringing SES (formerly Agoric/SES) support to RN and metamask-mobile
which runs on JSC and V8, but not Hermes as we know
stacktraces ^ from the SES lockdown shim (e.g.
curl -O https://npmfs.com/download/ses/0.18.4/dist/lockdown.umd.js
)also importable via
yarn add ses
, but needing additional Metro and Babel config for.cjs
i note potentially supporting this feature's been discussed in the past (cc @kumavis) and past convo's
is this a feature you guys looking to make happen anytime soon?
or still only accepting community contributions
Solution
Describe the solution you'd like to happen: local eval() support 🙏
Or
with
statements support (can be split into separate ft req)Alternatives considered
eval
with
statementseval()
with
statementsAdditional Context
SES
https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_DIRECT_EVAL.md
React Native LavaMoat tracker
Hermes docs
hermesengine.dev/playground
The text was updated successfully, but these errors were encountered: