{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang-nursery/rust-wasm/issues/35","repository_url":"https://api.github.com/repos/rust-lang-nursery/rust-wasm","labels_url":"https://api.github.com/repos/rust-lang-nursery/rust-wasm/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang-nursery/rust-wasm/issues/35/comments","events_url":"https://api.github.com/repos/rust-lang-nursery/rust-wasm/issues/35/events","html_url":"https://github.com/rust-lang-nursery/rust-wasm/issues/35","id":292872893,"number":35,"title":"wasm-npm-packager: what to write it in","user":{"login":"ashleygwilliams","id":1163554,"avatar_url":"https://avatars0.githubusercontent.com/u/1163554?v=4","gravatar_id":"","url":"https://api.github.com/users/ashleygwilliams","html_url":"https://github.com/ashleygwilliams","followers_url":"https://api.github.com/users/ashleygwilliams/followers","following_url":"https://api.github.com/users/ashleygwilliams/following{/other_user}","gists_url":"https://api.github.com/users/ashleygwilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/ashleygwilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashleygwilliams/subscriptions","organizations_url":"https://api.github.com/users/ashleygwilliams/orgs","repos_url":"https://api.github.com/users/ashleygwilliams/repos","events_url":"https://api.github.com/users/ashleygwilliams/events{/privacy}","received_events_url":"https://api.github.com/users/ashleygwilliams/received_events","type":"User","site_admin":false},"labels":[{"id":803087562,"url":"https://api.github.com/repos/rust-lang-nursery/rust-wasm/labels/packaging","name":"packaging","color":"5319e7","default":false},{"id":803927006,"url":"https://api.github.com/repos/rust-lang-nursery/rust-wasm/labels/wasm%20tooling","name":"wasm tooling","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-01-30T17:37:34Z","updated_at":"2018-02-11T02:43:35Z","closed_at":null,"author_association":"MEMBER","body":"i'm currently tasked with writing a tool to take compiled WASM and package it up for publishing to npm, the requirements for which are documented in #34. in thinking about this workflow, i realize that the question of what to write this tool in is an interesting one.\r\n\r\ncurrent candidates:\r\n- rust\r\n- node\r\n- shell? (let's not, for maintainability/contributors' sake?)\r\n\r\nquestions to think about:\r\n- who will use this tool?\r\n- what langs/toolchains do they already have?\r\n- what would they be willing to use?\r\n- should we write this tool in a few langs? not just one?\r\n- is a goal to have this get built into current pkg managers, cargo? npm? or should it remain independent? what are the factors in making this decision?\r\n\r\nwould love to hear ya'lls thoughts on the matter."},"comment":{"url":"https://api.github.com/repos/rust-lang-nursery/rust-wasm/issues/comments/364714611","html_url":"https://github.com/rust-lang-nursery/rust-wasm/issues/35#issuecomment-364714611","issue_url":"https://api.github.com/repos/rust-lang-nursery/rust-wasm/issues/35","id":364714611,"user":{"login":"Pauan","id":97238,"avatar_url":"https://avatars2.githubusercontent.com/u/97238?v=4","gravatar_id":"","url":"https://api.github.com/users/Pauan","html_url":"https://github.com/Pauan","followers_url":"https://api.github.com/users/Pauan/followers","following_url":"https://api.github.com/users/Pauan/following{/other_user}","gists_url":"https://api.github.com/users/Pauan/gists{/gist_id}","starred_url":"https://api.github.com/users/Pauan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pauan/subscriptions","organizations_url":"https://api.github.com/users/Pauan/orgs","repos_url":"https://api.github.com/users/Pauan/repos","events_url":"https://api.github.com/users/Pauan/events{/privacy}","received_events_url":"https://api.github.com/users/Pauan/received_events","type":"User","site_admin":false},"created_at":"2018-02-11T02:43:35Z","updated_at":"2018-02-11T02:43:35Z","author_association":"NONE","body":"> @sendilkumarn Do we have any example of converting an entire lib into one wasm file.\r\n\r\nThere is a [Rust WebAssembly book](https://rust-lang-nursery.github.io/rust-wasm/introduction.html) which contains some simple examples. There is work being done on expanding and improving the book. WebAssembly support for Rust is still in the early stages: there is a lot of discussion happening but it will take time for things to be implemented and stabilized.\r\n\r\nIf you want examples, right now the best way is to write them yourself. I have written a ~4,000 line Rust program and then used [`cargo-web`](https://crates.io/crates/cargo-web) and [`stdweb`](https://crates.io/crates/stdweb) to compile it to WebAssembly (with emscripten).\r\n\r\nIt works great, though there are a lot of intricacies with the JavaScript interop. In general I've found that the `.wasm` file is roughly the same size as the equivalent x86_64 binary, though it's quite a bit larger than the equivalent JavaScript code (this is due to various complicated reasons)."}}
{"actor":{"display_login":"Pauan"}}