{"action":"created","comment":{"url":"https://api.github.com/repos/ballercat/wasm-loader/pulls/comments/169084822","pull_request_review_id":97553500,"id":169084822,"diff_hunk":"@@ -23,6 +23,8 @@\n   },\n   \"homepage\": \"https://github.com/ballercat/wasm-loader#readme\",\n   \"dependencies\": {\n+    \"loader-utils\": \"^1.1.0\",\n+    \"wasm-dce\": \"0.0.7\"","path":"package.json","position":5,"original_position":5,"commit_id":"e67d23050ed0b4c9b1620fdb9a2302f045881339","original_commit_id":"e67d23050ed0b4c9b1620fdb9a2302f045881339","user":{"login":"xtuc","id":1493671,"avatar_url":"https://avatars3.githubusercontent.com/u/1493671?v=4","gravatar_id":"","url":"https://api.github.com/users/xtuc","html_url":"https://github.com/xtuc","followers_url":"https://api.github.com/users/xtuc/followers","following_url":"https://api.github.com/users/xtuc/following{/other_user}","gists_url":"https://api.github.com/users/xtuc/gists{/gist_id}","starred_url":"https://api.github.com/users/xtuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtuc/subscriptions","organizations_url":"https://api.github.com/users/xtuc/orgs","repos_url":"https://api.github.com/users/xtuc/repos","events_url":"https://api.github.com/users/xtuc/events{/privacy}","received_events_url":"https://api.github.com/users/xtuc/received_events","type":"User","site_admin":false},"body":"Yes, the API is really simple and I don't see why we would have to change it.","created_at":"2018-02-19T14:07:15Z","updated_at":"2018-02-19T14:07:15Z","html_url":"https://github.com/ballercat/wasm-loader/pull/7#discussion_r169084822","pull_request_url":"https://api.github.com/repos/ballercat/wasm-loader/pulls/7","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ballercat/wasm-loader/pulls/comments/169084822"},"html":{"href":"https://github.com/ballercat/wasm-loader/pull/7#discussion_r169084822"},"pull_request":{"href":"https://api.github.com/repos/ballercat/wasm-loader/pulls/7"}},"in_reply_to_id":169073859},"pull_request":{"url":"https://api.github.com/repos/ballercat/wasm-loader/pulls/7","id":168460463,"html_url":"https://github.com/ballercat/wasm-loader/pull/7","diff_url":"https://github.com/ballercat/wasm-loader/pull/7.diff","patch_url":"https://github.com/ballercat/wasm-loader/pull/7.patch","issue_url":"https://api.github.com/repos/ballercat/wasm-loader/issues/7","number":7,"state":"open","locked":false,"title":"DCE prototype","user":{"login":"xtuc","id":1493671,"avatar_url":"https://avatars3.githubusercontent.com/u/1493671?v=4","gravatar_id":"","url":"https://api.github.com/users/xtuc","html_url":"https://github.com/xtuc","followers_url":"https://api.github.com/users/xtuc/followers","following_url":"https://api.github.com/users/xtuc/following{/other_user}","gists_url":"https://api.github.com/users/xtuc/gists{/gist_id}","starred_url":"https://api.github.com/users/xtuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtuc/subscriptions","organizations_url":"https://api.github.com/users/xtuc/orgs","repos_url":"https://api.github.com/users/xtuc/repos","events_url":"https://api.github.com/users/xtuc/events{/privacy}","received_events_url":"https://api.github.com/users/xtuc/received_events","type":"User","site_admin":false},"body":"I wanted to submit that PR now to have some early feedback. It's far from finished, i'm missing some Webpack skills, do you know how we can access the file importing the binary (as AST or source)?\r\n\r\n~~Currently the loader adds the binary each time you import it, we can safely remove what is not used in the binary~~\r\n\r\nAll the DCE logic is in [xtuc/wasm-dce](https://github.com/xtuc/wasm-dce).\r\n\r\nIt's _very experimental_, that's why I decided to use a feature flag `dce=1|0`. We can change it later.\r\n\r\n## Example\r\n\r\n**Before** [module.wasm](https://webassembly.js.org/share.html#0,97,115,109,1,0,0,0,1,7,1,96,2,127,127,1,127,3,2,1,0,7,7,1,3,97,100,100,0,0,10,9,1,7,0,32,0,32,1,106,11).\r\n\r\nindex.js:\r\n\r\n```js\r\nimport makeAdd from \"./add.wasm?dce=1\"\r\n\r\nmakeAdd().then(instance => {\r\n// ...\r\n});\r\n```\r\n\r\nAnd **after** [module.wasm](https://webassembly.js.org/share.html#0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,4,1,2,0,11,0,10,4,110,97,109,101,2,3,1,0,0).\r\n\r\nIf we detect that `instance.exports.add` is not used we can remove it from the binary.","created_at":"2018-02-11T16:13:26Z","updated_at":"2018-02-19T14:07:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2bef1f1cb0c7ac10eff27f7f7c9767fa92a91a15","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ballercat/wasm-loader/pulls/7/commits","review_comments_url":"https://api.github.com/repos/ballercat/wasm-loader/pulls/7/comments","review_comment_url":"https://api.github.com/repos/ballercat/wasm-loader/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ballercat/wasm-loader/issues/7/comments","statuses_url":"https://api.github.com/repos/ballercat/wasm-loader/statuses/e67d23050ed0b4c9b1620fdb9a2302f045881339","head":{"label":"xtuc:feat-add-wasm-dce","ref":"feat-add-wasm-dce","sha":"e67d23050ed0b4c9b1620fdb9a2302f045881339","user":{"login":"xtuc","id":1493671,"avatar_url":"https://avatars3.githubusercontent.com/u/1493671?v=4","gravatar_id":"","url":"https://api.github.com/users/xtuc","html_url":"https://github.com/xtuc","followers_url":"https://api.github.com/users/xtuc/followers","following_url":"https://api.github.com/users/xtuc/following{/other_user}","gists_url":"https://api.github.com/users/xtuc/gists{/gist_id}","starred_url":"https://api.github.com/users/xtuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtuc/subscriptions","organizations_url":"https://api.github.com/users/xtuc/orgs","repos_url":"https://api.github.com/users/xtuc/repos","events_url":"https://api.github.com/users/xtuc/events{/privacy}","received_events_url":"https://api.github.com/users/xtuc/received_events","type":"User","site_admin":false},"repo":{"id":121126967,"name":"wasm-loader","full_name":"xtuc/wasm-loader","owner":{"login":"xtuc","id":1493671,"avatar_url":"https://avatars3.githubusercontent.com/u/1493671?v=4","gravatar_id":"","url":"https://api.github.com/users/xtuc","html_url":"https://github.com/xtuc","followers_url":"https://api.github.com/users/xtuc/followers","following_url":"https://api.github.com/users/xtuc/following{/other_user}","gists_url":"https://api.github.com/users/xtuc/gists{/gist_id}","starred_url":"https://api.github.com/users/xtuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtuc/subscriptions","organizations_url":"https://api.github.com/users/xtuc/orgs","repos_url":"https://api.github.com/users/xtuc/repos","events_url":"https://api.github.com/users/xtuc/events{/privacy}","received_events_url":"https://api.github.com/users/xtuc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xtuc/wasm-loader","description":":sparkles: WASM webpack loader","fork":true,"url":"https://api.github.com/repos/xtuc/wasm-loader","forks_url":"https://api.github.com/repos/xtuc/wasm-loader/forks","keys_url":"https://api.github.com/repos/xtuc/wasm-loader/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xtuc/wasm-loader/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xtuc/wasm-loader/teams","hooks_url":"https://api.github.com/repos/xtuc/wasm-loader/hooks","issue_events_url":"https://api.github.com/repos/xtuc/wasm-loader/issues/events{/number}","events_url":"https://api.github.com/repos/xtuc/wasm-loader/events","assignees_url":"https://api.github.com/repos/xtuc/wasm-loader/assignees{/user}","branches_url":"https://api.github.com/repos/xtuc/wasm-loader/branches{/branch}","tags_url":"https://api.github.com/repos/xtuc/wasm-loader/tags","blobs_url":"https://api.github.com/repos/xtuc/wasm-loader/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xtuc/wasm-loader/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xtuc/wasm-loader/git/refs{/sha}","trees_url":"https://api.github.com/repos/xtuc/wasm-loader/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xtuc/wasm-loader/statuses/{sha}","languages_url":"https://api.github.com/repos/xtuc/wasm-loader/languages","stargazers_url":"https://api.github.com/repos/xtuc/wasm-loader/stargazers","contributors_url":"https://api.github.com/repos/xtuc/wasm-loader/contributors","subscribers_url":"https://api.github.com/repos/xtuc/wasm-loader/subscribers","subscription_url":"https://api.github.com/repos/xtuc/wasm-loader/subscription","commits_url":"https://api.github.com/repos/xtuc/wasm-loader/commits{/sha}","git_commits_url":"https://api.github.com/repos/xtuc/wasm-loader/git/commits{/sha}","comments_url":"https://api.github.com/repos/xtuc/wasm-loader/comments{/number}","issue_comment_url":"https://api.github.com/repos/xtuc/wasm-loader/issues/comments{/number}","contents_url":"https://api.github.com/repos/xtuc/wasm-loader/contents/{+path}","compare_url":"https://api.github.com/repos/xtuc/wasm-loader/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xtuc/wasm-loader/merges","archive_url":"https://api.github.com/repos/xtuc/wasm-loader/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xtuc/wasm-loader/downloads","issues_url":"https://api.github.com/repos/xtuc/wasm-loader/issues{/number}","pulls_url":"https://api.github.com/repos/xtuc/wasm-loader/pulls{/number}","milestones_url":"https://api.github.com/repos/xtuc/wasm-loader/milestones{/number}","notifications_url":"https://api.github.com/repos/xtuc/wasm-loader/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xtuc/wasm-loader/labels{/name}","releases_url":"https://api.github.com/repos/xtuc/wasm-loader/releases{/id}","deployments_url":"https://api.github.com/repos/xtuc/wasm-loader/deployments","created_at":"2018-02-11T13:37:50Z","updated_at":"2018-02-11T13:37:51Z","pushed_at":"2018-02-19T08:26:25Z","git_url":"git://github.com/xtuc/wasm-loader.git","ssh_url":"git@github.com:xtuc/wasm-loader.git","clone_url":"https://github.com/xtuc/wasm-loader.git","svn_url":"https://github.com/xtuc/wasm-loader","homepage":"","size":32,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ballercat:master","ref":"master","sha":"9432cef22b8101d9a9112ab08aff48b60468c733","user":{"login":"ballercat","id":743990,"avatar_url":"https://avatars2.githubusercontent.com/u/743990?v=4","gravatar_id":"","url":"https://api.github.com/users/ballercat","html_url":"https://github.com/ballercat","followers_url":"https://api.github.com/users/ballercat/followers","following_url":"https://api.github.com/users/ballercat/following{/other_user}","gists_url":"https://api.github.com/users/ballercat/gists{/gist_id}","starred_url":"https://api.github.com/users/ballercat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ballercat/subscriptions","organizations_url":"https://api.github.com/users/ballercat/orgs","repos_url":"https://api.github.com/users/ballercat/repos","events_url":"https://api.github.com/users/ballercat/events{/privacy}","received_events_url":"https://api.github.com/users/ballercat/received_events","type":"User","site_admin":false},"repo":{"id":85236827,"name":"wasm-loader","full_name":"ballercat/wasm-loader","owner":{"login":"ballercat","id":743990,"avatar_url":"https://avatars2.githubusercontent.com/u/743990?v=4","gravatar_id":"","url":"https://api.github.com/users/ballercat","html_url":"https://github.com/ballercat","followers_url":"https://api.github.com/users/ballercat/followers","following_url":"https://api.github.com/users/ballercat/following{/other_user}","gists_url":"https://api.github.com/users/ballercat/gists{/gist_id}","starred_url":"https://api.github.com/users/ballercat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ballercat/subscriptions","organizations_url":"https://api.github.com/users/ballercat/orgs","repos_url":"https://api.github.com/users/ballercat/repos","events_url":"https://api.github.com/users/ballercat/events{/privacy}","received_events_url":"https://api.github.com/users/ballercat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ballercat/wasm-loader","description":":sparkles: WASM webpack loader","fork":false,"url":"https://api.github.com/repos/ballercat/wasm-loader","forks_url":"https://api.github.com/repos/ballercat/wasm-loader/forks","keys_url":"https://api.github.com/repos/ballercat/wasm-loader/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ballercat/wasm-loader/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ballercat/wasm-loader/teams","hooks_url":"https://api.github.com/repos/ballercat/wasm-loader/hooks","issue_events_url":"https://api.github.com/repos/ballercat/wasm-loader/issues/events{/number}","events_url":"https://api.github.com/repos/ballercat/wasm-loader/events","assignees_url":"https://api.github.com/repos/ballercat/wasm-loader/assignees{/user}","branches_url":"https://api.github.com/repos/ballercat/wasm-loader/branches{/branch}","tags_url":"https://api.github.com/repos/ballercat/wasm-loader/tags","blobs_url":"https://api.github.com/repos/ballercat/wasm-loader/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ballercat/wasm-loader/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ballercat/wasm-loader/git/refs{/sha}","trees_url":"https://api.github.com/repos/ballercat/wasm-loader/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ballercat/wasm-loader/statuses/{sha}","languages_url":"https://api.github.com/repos/ballercat/wasm-loader/languages","stargazers_url":"https://api.github.com/repos/ballercat/wasm-loader/stargazers","contributors_url":"https://api.github.com/repos/ballercat/wasm-loader/contributors","subscribers_url":"https://api.github.com/repos/ballercat/wasm-loader/subscribers","subscription_url":"https://api.github.com/repos/ballercat/wasm-loader/subscription","commits_url":"https://api.github.com/repos/ballercat/wasm-loader/commits{/sha}","git_commits_url":"https://api.github.com/repos/ballercat/wasm-loader/git/commits{/sha}","comments_url":"https://api.github.com/repos/ballercat/wasm-loader/comments{/number}","issue_comment_url":"https://api.github.com/repos/ballercat/wasm-loader/issues/comments{/number}","contents_url":"https://api.github.com/repos/ballercat/wasm-loader/contents/{+path}","compare_url":"https://api.github.com/repos/ballercat/wasm-loader/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ballercat/wasm-loader/merges","archive_url":"https://api.github.com/repos/ballercat/wasm-loader/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ballercat/wasm-loader/downloads","issues_url":"https://api.github.com/repos/ballercat/wasm-loader/issues{/number}","pulls_url":"https://api.github.com/repos/ballercat/wasm-loader/pulls{/number}","milestones_url":"https://api.github.com/repos/ballercat/wasm-loader/milestones{/number}","notifications_url":"https://api.github.com/repos/ballercat/wasm-loader/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ballercat/wasm-loader/labels{/name}","releases_url":"https://api.github.com/repos/ballercat/wasm-loader/releases{/id}","deployments_url":"https://api.github.com/repos/ballercat/wasm-loader/deployments","created_at":"2017-03-16T20:03:38Z","updated_at":"2018-02-18T18:37:58Z","pushed_at":"2018-02-19T08:26:26Z","git_url":"git://github.com/ballercat/wasm-loader.git","ssh_url":"git@github.com:ballercat/wasm-loader.git","clone_url":"https://github.com/ballercat/wasm-loader.git","svn_url":"https://github.com/ballercat/wasm-loader","homepage":"","size":22,"stargazers_count":318,"watchers_count":318,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":15,"open_issues":3,"watchers":318,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ballercat/wasm-loader/pulls/7"},"html":{"href":"https://github.com/ballercat/wasm-loader/pull/7"},"issue":{"href":"https://api.github.com/repos/ballercat/wasm-loader/issues/7"},"comments":{"href":"https://api.github.com/repos/ballercat/wasm-loader/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/ballercat/wasm-loader/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/ballercat/wasm-loader/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ballercat/wasm-loader/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/ballercat/wasm-loader/statuses/e67d23050ed0b4c9b1620fdb9a2302f045881339"}},"author_association":"NONE"}}
{"actor":{"display_login":"xtuc"}}