-
Notifications
You must be signed in to change notification settings - Fork 68
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
Comments
https://github.com/Agoric/Nat is now the home of |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 buildNat()
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).The text was updated successfully, but these errors were encountered: