-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Requires: #52
Our current incarnation of a vat lives in an iframe. Other vats may wish to live in realms as far flung as nodejs processes or the xsnap-wasm runtime. The vat operation ought to be consistent across these realms, implying an abstraction barrier to be discovered.
A vat, provided an abstract realm during construction, ought to be able to respond to the vat management api without worry for the realm details.
In particular, vats communicate with the kernel over an @ocap/streams/StreamPair, and should be able to use the realm's methods to implement the following:
launchstopterminate
As an example, when the realm of the vat is an iframe: launch should create if it does not exist an iframe with a DOM id unique to that vat; terminate should clean up that iframe. It is worth noting that in the case of an iframe realm, the stream over which the vat communicates cannot exist until the vat is launched.