#542: Realms API ECMAScript Proposal

Visit on Github.

Opened Aug 5, 2020

Saluton TAG!

I'm requesting a TAG review of TC39's Realms API.

Realms are a distinct global environment, with its own global object containing its own intrinsics and built-ins. The Realms proposal provides a new mechanism to execute JavaScript code within the context of a new global object and set of JavaScript built-ins. The Realm constructor creates this kind of a new global object.

  • Explainer¹ (minimally containing user needs and example code): https://github.com/tc39/proposal-realms/blob/main/explainer.md
  • Security and Privacy self-review²: here
  • GitHub repo (if you prefer feedback filed there): ttps://github.com/tc39/proposal-realms
  • Primary contacts (and their relationship to the specification):
    • Caridy Patiño (@caridy), co-champion, Salesforce
    • Mark S. Miller (@erights), co-champion, Agoric
    • Leo Balter (@leobalter), co-champion, Salesforce
    • Daniel Ehrenberg (@littledan), advisor, Igalia (in partnership with Bloomberg)
  • Organization/project driving the design: Salesforce, Agoric
  • External status/issue trackers for this feature (publicly visible, e.g. Chrome Status): none

Further details:

  • I have reviewed the TAG's API Design Principles
  • The group where the incubation/design work on this is being done (or is intended to be done in the future): TC39
  • The group where standardization of this work is intended to be done ("unknown" if not known): TC39
  • Existing major pieces of multi-stakeholder review or discussion of this design:
    • Presentations summarized here
    • Lastest TC39 meeting notes about Realms here
  • Major unresolved issues with or opposition to this design: https://github.com/tc39/proposal-realms/issues/238
  • This work is being funded by: Salesforce, Agoric, Bloomberg

You should also know that...

We'd prefer the TAG provide feedback as (please delete all but the desired option):

  • 🐛 open issues in our GitHub repo for each point of feedback

(We are also fine to reuse this current issue)


CAREFULLY READ AND DELETE CONTENT BELOW THIS LINE BEFORE SUBMITTING

Please preview the issue and check that the links work before submitting.

In particular:

  • if anything links to a URL which requires authentication (e.g. Google document), please make sure anyone with the link can access the document. We would prefer public documents though, since we work in the open.

¹ For background, see our explanation of how to write a good explainer. We recommend the explainer to be in Markdown.

² Even for early-stage ideas, a Security and Privacy questionnaire helps us understand potential security and privacy issues and mitigations for your design, and can save us asking redundant questions. See https://www.w3.org/TR/security-privacy-questionnaire/.

Discussions

2020-11-16

Minutes

Reviewed updates to explainer and concerns from HTML folks. Rossen raised concerns about possibility of realms being used as communication channels.

Overall happy with approach.

2021-04-26

Minutes

Peter: domenic's feedback encorporated...

Tess: wording of challenge global names... not clear on "new list" vs. "shortening it". Not sure what relationship to other list is... some shared context is missing.

Dan: any other items from Leo's last comment that we could express an opinion on?

[group re-reading issue and re-digesting]

Peter: I'd like to take a deeper dive into it...

Lea: This is very big.

Peter: No direct access objects between realms. Significant change to capabilities.

Dan: punt it to the f2f?

Tess: not unreasonable. It's a meaty enough thing.

Peter: [punted

2021-05-24

Minutes

[Revisiting situation on Realms proposal in TC39]

Ken: Lea had use cases. Peter had use cases. Domenic had a pushback and an alternartive proposal - callable boundary realms.

Dan: looks like there's a TC39 meeting coming up today and Domenic will join.

Lea: Peter will also try to join.

Dan: Anything else we can do?

Ken: Let's see the result..

2021-05-24

Minutes

Reviewed some back-channel communication. TC39 meeting tomorrow. Some TAG members will try to attend

2021-05-31

Minutes

Tess: wasn't clear to me that Dominic's concerns were being adequately addressed, but been a while. Was a TC39 plenary since then. We need to find out if there have been any major changes

2021-06-21

Minutes

Peter: wanted to make sure Lea & Tess got eyes on it... Domenic's proposal limits realms to callables. Seems like there's a library that allows you to emulate shared objects using callables.

[discussion on these options]

Tess: either way authors will end up with an API that sounds pretty nice and lets them do things they currently can't do. Opportunity cost. Right thing might be to take a step back.

[set to proposed closing and we can discuss closing comment at the plenary