Skip to content
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

move Nat out into a separate package #171

Closed
warner opened this issue Feb 8, 2019 · 1 comment · Fixed by Agoric/SES#50
Closed

move Nat out into a separate package #171

warner opened this issue Feb 8, 2019 · 1 comment · Fixed by Agoric/SES#50

Comments

@warner
Copy link
Contributor

warner commented Feb 8, 2019

This will help with Agoric/SES#13, as other (non-SES-related) packages can import it.

The only twist is that we will have to change SES to import it, stringify the function, inject this string into the SES realm as a shim, and make it available as a (frozen/hardened/defensible) part of the global SES environment. I think the only constraint this puts on the new Nat module is to build Nat() out of a single function, so that `${Nat}` is sufficient to get all the code (i.e. Nat is not allowed to call any other functions which aren't part of the normal global environment).

@warner
Copy link
Contributor Author

warner commented Feb 12, 2019

https://github.com/Agoric/Nat is now the home of Nat, and it is on npm as @agoric/nat. The next step is to change SES to pull from that instead of using its local copy.

warner referenced this issue in Agoric/SES Feb 13, 2019
closes #45
warner referenced this issue in Agoric/SES Feb 21, 2019
* remove `Nat` and `def` from the global environment #45
* provide a helper function named `s.makeRequire()` to build a `require`
  endowment. This can be configured to enable `require('@agoric/nat')` or
  `require('@agoric/harden')` (among others), so the same code can work
  either inside or outside of a SES realm. For details of its configuration,
  see the comments in the commit which landed it. #13
* harden() comes from `@agoric/make-hardener`, which doesn't climb
  prototype/inheritance chains, but does complain if the prototype wasn't
  already known to harden(). This avoids the "Ice-9" freeze-the-world
  problem, and also serves to signal when an object from one realm is passed
  into the harden() of a different realm. #15
* harden() now shares a WeakSet of previously-hardened objects #4
* use harden() instead of def() #39
* SES no longer depends upon Nat, but uses it during unit tests. Client code
  that wants Nat should use `require('@agoric/nat')`. #45
* Include AsyncIteratorPrototype in the set of anonIntrinsics #58
* use eslint to format all SES code
@jfparadis jfparadis transferred this issue from Agoric/SES Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant