{"action":"created","issue":{"url":"https://api.github.com/repos/WebAssembly/esm-integration/issues/13","repository_url":"https://api.github.com/repos/WebAssembly/esm-integration","labels_url":"https://api.github.com/repos/WebAssembly/esm-integration/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/WebAssembly/esm-integration/issues/13/comments","events_url":"https://api.github.com/repos/WebAssembly/esm-integration/issues/13/events","html_url":"https://github.com/WebAssembly/esm-integration/pull/13","id":349850919,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3ODQ0ODQy","number":13,"title":"Update proposal to accommodate need for type imports","user":{"login":"linclark","id":105464,"node_id":"MDQ6VXNlcjEwNTQ2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/105464?v=4","gravatar_id":"","url":"https://api.github.com/users/linclark","html_url":"https://github.com/linclark","followers_url":"https://api.github.com/users/linclark/followers","following_url":"https://api.github.com/users/linclark/following{/other_user}","gists_url":"https://api.github.com/users/linclark/gists{/gist_id}","starred_url":"https://api.github.com/users/linclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linclark/subscriptions","organizations_url":"https://api.github.com/users/linclark/orgs","repos_url":"https://api.github.com/users/linclark/repos","events_url":"https://api.github.com/users/linclark/events{/privacy}","received_events_url":"https://api.github.com/users/linclark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-12T22:54:39Z","updated_at":"2018-08-20T17:57:57Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/WebAssembly/esm-integration/pulls/13","html_url":"https://github.com/WebAssembly/esm-integration/pull/13","diff_url":"https://github.com/WebAssembly/esm-integration/pull/13.diff","patch_url":"https://github.com/WebAssembly/esm-integration/pull/13.patch"},"body":"This PR makes some fundamental changes in the way that wasm ES modules will be instantiated. Instead of running [instantiate](https://webassembly.github.io/spec/core/exec/modules.html#instantiation) during the ES module system's instantiation phase.\r\n\r\nThis change is motivated by work going on to share types between JS and wasm. This will require importing types. Because types defined in JS would only be initialized during evaluation, we need JS modules exporting types to evaluate before the importing wasm module snapshots them.\r\n\r\nDuring the instantiation phase, we create live bindings for every declared export of a wasm module and link to the import memory locations but do not snapshot them yet. Unlike functions in JavaScript, function exports in WebAssembly will not be hoisted and are instead like every other kind of export. They get filled in when you evaluate the module.\r\n\r\nDuring evaluation, the wasm module will take a snapshot of all of its imported bindings and initialize all of its exports. \r\n\r\nI will add an item to the [next CG agenda](https://github.com/WebAssembly/meetings/blob/master/2018/CG-08-21.md) to discuss this further."},"comment":{"url":"https://api.github.com/repos/WebAssembly/esm-integration/issues/comments/414407276","html_url":"https://github.com/WebAssembly/esm-integration/pull/13#issuecomment-414407276","issue_url":"https://api.github.com/repos/WebAssembly/esm-integration/issues/13","id":414407276,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDQwNzI3Ng==","user":{"login":"linclark","id":105464,"node_id":"MDQ6VXNlcjEwNTQ2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/105464?v=4","gravatar_id":"","url":"https://api.github.com/users/linclark","html_url":"https://github.com/linclark","followers_url":"https://api.github.com/users/linclark/followers","following_url":"https://api.github.com/users/linclark/following{/other_user}","gists_url":"https://api.github.com/users/linclark/gists{/gist_id}","starred_url":"https://api.github.com/users/linclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linclark/subscriptions","organizations_url":"https://api.github.com/users/linclark/orgs","repos_url":"https://api.github.com/users/linclark/repos","events_url":"https://api.github.com/users/linclark/events{/privacy}","received_events_url":"https://api.github.com/users/linclark/received_events","type":"User","site_admin":false},"created_at":"2018-08-20T17:57:57Z","updated_at":"2018-08-20T17:57:57Z","author_association":"MEMBER","body":"Till and I discussed his idea of changing the terminology in the ES spec. I like the idea of using the term \"linking\" instead of \"instantiate\". For evaluation, I don't know what an appropriate term would be.\r\n\r\n@tschneidereit, do you have a feel for how the committee would receive this?\r\n\r\nIn the meantime, it is difficult to fully disambiguate this. If the ES spec doesn't change, we will need to have a method in the wasm JS embedding spec called `Instantiate` (which would not perform instantiation as it's defined in the core spec) and another called `Evaluate` (in which the work of `WebAssembly.instantiate` would happen)."}}
{"actor":{"display_login":"linclark"}}