{"generator":"Jekyll","link":[{"@attributes":{"href":"https:\/\/rustwasm.github.io\/feed.xml","rel":"self","type":"application\/atom+xml"}},{"@attributes":{"href":"https:\/\/rustwasm.github.io\/","rel":"alternate","type":"text\/html"}}],"updated":"2025-08-25T09:21:30+00:00","id":"https:\/\/rustwasm.github.io\/feed.xml","title":"Rust and WebAssembly","subtitle":"Stay up to date with events, learning resources, and recent developments in Rust and WebAssembly community.","entry":[{"title":"This Week in Rust and WebAssembly 15","link":{"@attributes":{"href":"https:\/\/rustwasm.github.io\/2019\/03\/28\/this-week-in-rust-and-wasm-015.html","rel":"alternate","type":"text\/html","title":"This Week in Rust and WebAssembly 15"}},"published":"2019-03-28T00:00:00+00:00","updated":"2019-03-28T00:00:00+00:00","id":"https:\/\/rustwasm.github.io\/2019\/03\/28\/this-week-in-rust-and-wasm-015","content":"<p>Hello and welcome to another issue of <em>This Week in Rust and WebAssembly<\/em>!<\/p>\n\n<p><a href=\"https:\/\/rust-lang.org\">Rust<\/a> is a systems language pursuing the trifecta:\nsafety, concurrency, and speed.<\/p>\n\n<p><a href=\"http:\/\/webassembly.org\">WebAssembly<\/a> is a stack-based virtual machine and\ninstruction set. It is fast, safe, portable, and part of the open Web\nplatform. By compiling to WebAssembly, we can run Rust code on the Web!<\/p>\n\n<p>This is a weekly summary of Rust and WebAssembly\u2019s progress and community.<\/p>\n\n<p>Did we miss something? Tweet to us at <a href=\"https:\/\/twitter.com\/rustwasm\">@rustwasm<\/a>\nor <a href=\"https:\/\/github.com\/rustwasm\/rustwasm.github.io\">send us a pull request<\/a>.<\/p>\n\n<p><strong>Want to get involved in Rust and WebAssembly? <a href=\"https:\/\/github.com\/rustwasm\/team\/blob\/master\/README.md#get-involved\">Join the Rust and WebAssembly working group!<\/a><\/strong><\/p>\n\n<h2 id=\"news-and-blog-posts-from-around-the-web\">News and Blog Posts from Around the Web<\/h2>\n\n<p><em>Want to make sure something ends up on this list next time we publish an issue?\n<a href=\"https:\/\/github.com\/rustwasm\/team\/issues\/79\">Leave a comment on this issue.<\/a><\/em><\/p>\n\n<ul>\n  <li><a href=\"https:\/\/hacks.mozilla.org\/2019\/03\/standardizing-wasi-a-webassembly-system-interface\/\"><strong>Standardizing WASI: A system interface to run WebAssembly outside the\nweb<\/strong><\/a>\n    <ul>\n      <li>@alexcrichton already has a pull request to <a href=\"https:\/\/github.com\/rust-lang\/rust\/pull\/59464\">add a <code class=\"highlighter-rouge\">wasm32-unknown-wasi<\/code>\ntarget<\/a> for Rust!<\/li>\n    <\/ul>\n  <\/li>\n  <li><code class=\"highlighter-rouge\">RustVolley<\/code> is a reimplementation of the Blobby Volley 2 game in Rust and Wasm\n    <ul>\n      <li><a href=\"https:\/\/github.com\/RustyVolley\/RustyVolleySrc\">Source<\/a><\/li>\n      <li><a href=\"https:\/\/rustyvolley.github.io\/WebDemo\/\">Live Demo<\/a><\/li>\n    <\/ul>\n  <\/li>\n  <li><a href=\"https:\/\/blog.cloudflare.com\/introducing-wrangler-cli\/\">CloudFlare\u2019s new <code class=\"highlighter-rouge\">wrangler<\/code> CLI tool lets you deploy Rust-generated Wasm on\nCloudFlare workers<\/a><\/li>\n  <li><a href=\"https:\/\/www.fastly.com\/blog\/announcing-lucet-fastly-native-webassembly-compiler-runtime\">Fastly open sources Lucet: a native WebAssembly compiler and\nruntime.<\/a>\nIts built with Rust on top of Cranelift and supports WASI.<\/li>\n<\/ul>\n\n<h2 id=\"updates-from-rustwasm\">Updates from <a href=\"https:\/\/github.com\/rustwasm\"><code class=\"highlighter-rouge\">rustwasm\/*<\/code><\/a><\/h2>\n\n<p><a href=\"https:\/\/internals.rust-lang.org\/t\/welcome-pauan-to-the-rust-and-webassembly-domain-working-group-core-team\/9707\"><strong>\ud83c\udf89 Welcome @Pauan to the Rust and WebAssembly working group core\nteam! \ud83c\udf89<\/strong><\/a><\/p>\n\n<h3 id=\"rfcs\">RFCs<\/h3>\n\n<h4 id=\"new-rfcs\">New RFCs<\/h4>\n\n<p>None.<\/p>\n\n<h4 id=\"final-comment-period-rfcs\">Final Comment Period RFCs<\/h4>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/rfcs\/pull\/9\">Add an amendment to the RFC process<\/a><\/li>\n<\/ul>\n\n<h4 id=\"merged-rfcs\">Merged RFCs<\/h4>\n\n<p>None.<\/p>\n\n<h3 id=\"working-group-meetings\">Working Group Meetings<\/h3>\n\n<ul>\n  <li><a href=\"https:\/\/www.youtube.com\/watch?v=gaTwOc0eGb4\">Watch the recording of this week\u2019s working group meeting on\nYouTube<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/team\/issues\/264\">Come join us at next week\u2019s working group\nmeeting!<\/a><\/li>\n<\/ul>\n\n<h3 id=\"gloo\">Gloo<\/h3>\n\n<ul>\n  <li><a href=\"https:\/\/rustwasm.github.io\/2019\/03\/26\/gloo-onion-layers.html\"><strong>Gloo Update: Onion Layers, Timers, and\nEvents<\/strong><\/a><\/li>\n  <li>@Aehmlo <a href=\"https:\/\/github.com\/rustwasm\/gloo\/pull\/38\">split up the <code class=\"highlighter-rouge\">gloo_timers<\/code> crate\u2019s public\nAPI<\/a> to use <code class=\"highlighter-rouge\">callbacks<\/code> and\n<code class=\"highlighter-rouge\">futures<\/code> submodules, as we collectively agreed upon in other issues.<\/li>\n  <li>@cbrevik <a href=\"https:\/\/github.com\/rustwasm\/gloo\/pull\/32\">implemented the <code class=\"highlighter-rouge\">gloo_console_timer<\/code>\ncrate,<\/a> which provides scoped\nclosures and RAII-style helpers for working with <code class=\"highlighter-rouge\">console.time<\/code> and\n<code class=\"highlighter-rouge\">console.timeEnd<\/code>.<\/li>\n  <li>@OddCoincidence <a href=\"https:\/\/github.com\/rustwasm\/gloo\/pull\/48\">updated the <code class=\"highlighter-rouge\">gloo_timers<\/code>\ninternals<\/a> to use\n<code class=\"highlighter-rouge\">wasm_bindgen::closures::Closure::once<\/code> for <code class=\"highlighter-rouge\">setTimeout<\/code>.<\/li>\n  <li>@RyLev added some initial <a href=\"https:\/\/github.com\/rustwasm\/gloo\/pull\/46\">Azure Pipelines continuous integration\ntests<\/a> for Gloo.<\/li>\n  <li>@David-OConnor added the <a href=\"https:\/\/github.com\/rustwasm\/gloo\/pull\/45\">skeleton of an <code class=\"highlighter-rouge\">mdbook<\/code>\nguide<\/a> for Gloo.<\/li>\n<\/ul>\n\n<h3 id=\"wasm-bindgen\"><code class=\"highlighter-rouge\">wasm-bindgen<\/code><\/h3>\n\n<ul>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1384\">tweaked the <code class=\"highlighter-rouge\">no-modules<\/code> target\u2019s generated JavaScript glue for\ninstantiating Wasm\nmodules<\/a> to support\nCloudFlare workers (and other environments where <code class=\"highlighter-rouge\">x instanceof\nWebAssembly.Module<\/code> might fail, like across <code class=\"highlighter-rouge\">&lt;iframe&gt;<\/code>s)<\/li>\n  <li>@alexcrichton made it so that our emitted JS glue for reflecting Rust closures\nas JS functions will properly <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1385\">detect and protect against use-after-free from\nthe JS side.<\/a><\/li>\n  <li>@alexcrichton fixed a bug where Rust structs exported as JS <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1383\">didn\u2019t always\nemit the JS classes glue in a deterministic\norder.<\/a><\/li>\n  <li>@fitzgen <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1382\">made the \u201cwithout a JS bundler\u201d example use <code class=\"highlighter-rouge\">wasm-pack build\n--target web<\/code>,<\/a> now that\nits supported in the latest <code class=\"highlighter-rouge\">wasm-pack<\/code> release.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1369\">cleaned up the <code class=\"highlighter-rouge\">wasm-bindgen<\/code> CLI\u2019s\noptions<\/a> to take <code class=\"highlighter-rouge\">--target\nblah<\/code> instead of <code class=\"highlighter-rouge\">--blah<\/code> (which still exist but are deprecated).<\/li>\n  <li>@stevebob <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1358\">enabled <code class=\"highlighter-rouge\">mdbook<\/code>\u2019s link checking tests for the <code class=\"highlighter-rouge\">wasm-bindgen<\/code>\nguide<\/a> to our continuous\nintegration tests.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1305\">implemented\n<code class=\"highlighter-rouge\">rustwasm\/rfcs#8<\/code><\/a> to\nenable transitive crates dependencies on npm packages.<\/li>\n  <li>@RReverser <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1403\">added the <code class=\"highlighter-rouge\">constructor<\/code>\nproperty<\/a> to\n<code class=\"highlighter-rouge\">js_sys::Object<\/code>.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1401\">fixed sending large\n<code class=\"highlighter-rouge\">u32<\/code>s<\/a> from Wasm to JS.<\/li>\n  <li>@RReverser <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1398\">consistently exposed\n<code class=\"highlighter-rouge\">is_like_none<\/code><\/a> for our\ngenerated JS glue, fixing a bug along the way.<\/li>\n  <li>@RReverser <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1397\">simplified the ABI\nrepresentation<\/a> of\n<code class=\"highlighter-rouge\">Option&lt;char&gt;<\/code>.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1395\">migrated all the <code class=\"highlighter-rouge\">wasm-bindgen-*<\/code>\ncrates<\/a> to Rust 2018\nedition.<\/li>\n  <li>@RReverser <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1393\">made iterating over JS objects via the JS iteration protocol\nfaster<\/a> by removing\nredundant property string decoding.<\/li>\n  <li>@RReverser <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1391\">made a special version of passing strings from JS to\nWasm<\/a> when we are\ntargeting Node.js that is faster than using Node.js\u2019s <code class=\"highlighter-rouge\">TextEncoder<\/code>\nimplementation.<\/li>\n<\/ul>\n\n<h3 id=\"wasm-pack\"><code class=\"highlighter-rouge\">wasm-pack<\/code><\/h3>\n\n<ul>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/598\">fixed a panic<\/a>\nthat could happen when installing the <code class=\"highlighter-rouge\">wasm-bindgen<\/code> CLI tool.<\/li>\n<\/ul>\n\n<h2 id=\"requests-for-contribution\">Requests for Contribution<\/h2>\n\n<p><strong>Want to get involved in Rust and WebAssembly? <a href=\"https:\/\/github.com\/rustwasm\/team\/blob\/master\/README.md#get-involved\">Join the Rust and WebAssembly\nworking group!<\/a><\/strong><\/p>\n\n<h3 id=\"new-good-first-issues\">New Good First Issues<\/h3>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/issues\/1390\"><code class=\"highlighter-rouge\">wasm-bindgen<\/code>: <code class=\"highlighter-rouge\">.d.ts<\/code> file for <code class=\"highlighter-rouge\">--web<\/code> target does not define the <code class=\"highlighter-rouge\">init()<\/code> function<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/issues\/1387\"><code class=\"highlighter-rouge\">wasm-bindgen<\/code>: Closures should implement <code class=\"highlighter-rouge\">std::fmt::Debug<\/code><\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/gloo\/issues\/41\">Gloo: Help ensure we have tracking issues on file for making utility crates for all Web platform features<\/a><\/li>\n<\/ul>\n\n<h3 id=\"new-help-wanted-issues\">New \u201cHelp Wanted\u201d Issues<\/h3>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/issues\/1399\"><code class=\"highlighter-rouge\">wasm-bindgen<\/code>: Closures should accept references as arguments<\/a><\/li>\n<\/ul>","author":{"name":{}},"summary":"Hello and welcome to another issue of This Week in Rust and WebAssembly!"},{"title":"Gloo Update: Onion Layers, Timers, and Events","link":{"@attributes":{"href":"https:\/\/rustwasm.github.io\/2019\/03\/26\/gloo-onion-layers.html","rel":"alternate","type":"text\/html","title":"Gloo Update: Onion Layers, Timers, and Events"}},"published":"2019-03-26T00:00:00+00:00","updated":"2019-03-26T00:00:00+00:00","id":"https:\/\/rustwasm.github.io\/2019\/03\/26\/gloo-onion-layers","content":"<p>About two weeks ago, we <a href=\"https:\/\/rustwasm.github.io\/2019\/03\/12\/lets-build-gloo-together.html\">kicked off<\/a> our effort to collectively\nbuild <a href=\"https:\/\/github.com\/rustwasm\/gloo\">Gloo<\/a>, a modular toolkit for building fast and reliable Web apps and\nlibraries with Rust and Wasm. We knew we wanted to explicitly cultivate the Rust\nand Wasm library ecosystem by spinning out reusable, standalone libraries:\nthings that would help you out whether you were writing a green-field Web app in\npure-Rust, building your own framework, or surgically inserting some\nRust-generated Wasm into an existing JavaScript project. What was still fuzzy,\nand which we didn\u2019t know yet, was <em>how<\/em> we were going design and expose these\nreusable bits.<\/p>\n\n<h2 id=\"onion-layered-apis\">Onion-Layered APIs<\/h2>\n\n<p>I\u2019m pleased to tell you that that after some collaborative discussion in issue\nthreads, we\u2019ve come up with a promising approach to designing Gloo APIs, and\nwe\u2019ve since formalized it a bit in <code class=\"highlighter-rouge\">CONTRIBUTING.md<\/code>. I\u2019ve nicknamed this\napproach \u201conion-layered\u201d API design.<\/p>\n\n<p>Briefly, we want to build mid-level abstraction libraries on top of raw <code class=\"highlighter-rouge\">-sys<\/code>\nbindings, build futures and streams integration on top of the mid-level APIs,\nand build high-level APIs on top of all that. But \u2014 crucially \u2014\nevery layer should be publicly exposed and reusable.<\/p>\n\n<p>While this approach to API design is certainly not novel, we want to very\ndeliberately follow it so that we<\/p>\n\n<ul>\n  <li>maximize reusability for the larger ecosystem, and<\/li>\n  <li>exercise our mid-level APIs when building higher-level APIs, to ensure their\ngenerality and suitability for acting as a solid foundation.<\/li>\n<\/ul>\n\n<p>As we go through and examine each layer, I\u2019ll use <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/WindowOrWorkerGlobalScope\/setTimeout\">the <code class=\"highlighter-rouge\">setTimeout<\/code> and\n<code class=\"highlighter-rouge\">setInterval<\/code> Web APIs<\/a> as a running example.<\/p>\n\n<h2 id=\"the-core-wasm-bindgen-js-sys-and-web-sys\">The Core: <code class=\"highlighter-rouge\">wasm-bindgen<\/code>, <code class=\"highlighter-rouge\">js-sys<\/code>, and <code class=\"highlighter-rouge\">web-sys<\/code><\/h2>\n\n<p>The innermost layer are raw bindings built on top of <a href=\"https:\/\/rustwasm.github.io\/2018\/09\/26\/announcing-web-sys.html\"><code class=\"highlighter-rouge\">wasm-bindgen<\/code>, <code class=\"highlighter-rouge\">js-sys<\/code>\nand <code class=\"highlighter-rouge\">web-sys<\/code><\/a>. These bindings are fast, have a light code\nsize foot print, and are future-compatible with <a href=\"https:\/\/github.com\/WebAssembly\/webidl-bindings\/blob\/9ada880991a26081279ee6b74e26502f5046a010\/proposals\/host-bindings\/Overview.md\">the host bindings\nproposal<\/a>.<\/p>\n\n<p>What they are <em>not<\/em> is super ergonomic to use all of the time. Using raw\n<code class=\"highlighter-rouge\">web-sys<\/code> bindings directly can sometimes feel like making raw <code class=\"highlighter-rouge\">libc<\/code> calls\ninstead of leveraging Rust\u2019s nice <code class=\"highlighter-rouge\">std<\/code> abstractions.<\/p>\n\n<p>Here is doing some operation after a 500 millisecond timeout using raw <code class=\"highlighter-rouge\">web-sys<\/code>\nbindings:<\/p>\n\n<div class=\"language-rust highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"k\">use<\/span> <span class=\"nn\">wasm_bindgen<\/span><span class=\"p\">::{<\/span><span class=\"nn\">closure<\/span><span class=\"p\">::<\/span><span class=\"n\">Closure<\/span><span class=\"p\">,<\/span> <span class=\"n\">JsCast<\/span><span class=\"p\">};<\/span>\n\n<span class=\"c\">\/\/ Create a Rust `FnOnce` closure that is exposed to JavaScript.<\/span>\n<span class=\"k\">let<\/span> <span class=\"n\">closure<\/span> <span class=\"o\">=<\/span> <span class=\"nn\">Closure<\/span><span class=\"p\">::<\/span><span class=\"nf\">once<\/span><span class=\"p\">(<\/span><span class=\"k\">move<\/span> <span class=\"p\">||<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nf\">do_some_operation<\/span><span class=\"p\">();<\/span>\n<span class=\"p\">});<\/span>\n\n<span class=\"c\">\/\/ Get the JavaScript function that reflects our Rust closure.<\/span>\n<span class=\"k\">let<\/span> <span class=\"n\">js_val<\/span> <span class=\"o\">=<\/span> <span class=\"n\">closure<\/span><span class=\"nf\">.as_ref<\/span><span class=\"p\">();<\/span>\n<span class=\"k\">let<\/span> <span class=\"n\">js_func<\/span> <span class=\"o\">=<\/span> <span class=\"n\">js_val<\/span><span class=\"py\">.unchecked_ref<\/span><span class=\"p\">::<\/span><span class=\"o\">&lt;<\/span><span class=\"nn\">js_sys<\/span><span class=\"p\">::<\/span><span class=\"n\">Function<\/span><span class=\"o\">&gt;<\/span><span class=\"p\">();<\/span>\n\n<span class=\"c\">\/\/ Finally, call the `window.setTimeout` API.<\/span>\n<span class=\"k\">let<\/span> <span class=\"n\">timeout_id<\/span> <span class=\"o\">=<\/span> <span class=\"nn\">web_sys<\/span><span class=\"p\">::<\/span><span class=\"nf\">window<\/span><span class=\"p\">()<\/span>\n    <span class=\"nf\">.expect<\/span><span class=\"p\">(<\/span><span class=\"s\">\"should have a `window`\"<\/span><span class=\"p\">)<\/span>\n    <span class=\"nf\">.set_timeout_with_callback_and_timeout_and_arguments_0<\/span><span class=\"p\">(<\/span><span class=\"n\">js_func<\/span><span class=\"p\">,<\/span> <span class=\"mi\">500<\/span><span class=\"p\">)<\/span>\n    <span class=\"nf\">.expect<\/span><span class=\"p\">(<\/span><span class=\"s\">\"should set a timeout OK\"<\/span><span class=\"p\">);<\/span>\n\n<span class=\"c\">\/\/ Then, if we ever decide we want to cancel the timeout, we do this:<\/span>\n<span class=\"nn\">web_sys<\/span><span class=\"p\">::<\/span><span class=\"nf\">window<\/span><span class=\"p\">()<\/span>\n    <span class=\"nf\">.expect<\/span><span class=\"p\">(<\/span><span class=\"s\">\"should have a `window`\"<\/span><span class=\"p\">)<\/span>\n    <span class=\"nf\">.clear_timeout_with_handle<\/span><span class=\"p\">(<\/span><span class=\"n\">timeout_id<\/span><span class=\"p\">);<\/span>\n<\/code><\/pre><\/div><\/div>\n\n<h2 id=\"the-callbacks-layer\">The <code class=\"highlighter-rouge\">callbacks<\/code> Layer<\/h2>\n\n<p>When we look at the raw <code class=\"highlighter-rouge\">web-sys<\/code> usage, there is a bit of type conversion\nnoise, some unfortunate method names, and a handful of <code class=\"highlighter-rouge\">unwrap<\/code>s for ignoring\nedge-case scenarios where we prefer to fail loudly rather than limp along. We\ncan clean all these things up with the first of our \u201cmid-level\u201d API layers,\nwhich in the case of timers is the <code class=\"highlighter-rouge\">callbacks<\/code> module in the <code class=\"highlighter-rouge\">gloo_timers<\/code> crate\n(which is also re-exported from the <code class=\"highlighter-rouge\">gloo<\/code> umbrella crate as <code class=\"highlighter-rouge\">gloo::timers<\/code>).<\/p>\n\n<p>The first \u201cmid-level\u201d API built on top of the <code class=\"highlighter-rouge\">-sys<\/code> bindings exposes all the\nsame functionality and the same design that the Web does, but uses proper Rust\ntypes. For example, at this layer, instead of taking untyped JavaScript\nfunctions with <code class=\"highlighter-rouge\">js_sys::Function<\/code>, we take any <code class=\"highlighter-rouge\">F: FnOnce()<\/code>. This layer is\nessentially the least opinionated direct API translation to Rust.<\/p>\n\n<div class=\"language-rust highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"k\">use<\/span> <span class=\"nn\">gloo<\/span><span class=\"p\">::<\/span><span class=\"nn\">timers<\/span><span class=\"p\">::<\/span><span class=\"nn\">callbacks<\/span><span class=\"p\">::<\/span><span class=\"n\">Timeout<\/span><span class=\"p\">;<\/span>\n<span class=\"c\">\/\/ Alternatively, we could use the `gloo_timers` crate without the rest of Gloo:<\/span>\n<span class=\"c\">\/\/ use gloo_timers::callbacks::Timeout;<\/span>\n\n<span class=\"c\">\/\/ Already, much nicer!<\/span>\n<span class=\"k\">let<\/span> <span class=\"n\">timeout<\/span> <span class=\"o\">=<\/span> <span class=\"nn\">Timeout<\/span><span class=\"p\">::<\/span><span class=\"nf\">new<\/span><span class=\"p\">(<\/span><span class=\"mi\">500<\/span><span class=\"p\">,<\/span> <span class=\"k\">move<\/span> <span class=\"p\">||<\/span> <span class=\"p\">{<\/span>\n    <span class=\"nf\">do_some_operation<\/span><span class=\"p\">();<\/span>\n<span class=\"p\">});<\/span>\n\n<span class=\"c\">\/\/ If we ever decide we want to cancel our delayed operation, all we do is drop<\/span>\n<span class=\"c\">\/\/ the `timeout` now:<\/span>\n<span class=\"k\">drop<\/span><span class=\"p\">(<\/span><span class=\"n\">timeout<\/span><span class=\"p\">);<\/span>\n\n<span class=\"c\">\/\/ Or if we never want to cancel, we can use `forget`:<\/span>\n<span class=\"n\">timeout<\/span><span class=\"nf\">.forget<\/span><span class=\"p\">();<\/span>\n<\/code><\/pre><\/div><\/div>\n\n<h2 id=\"layering-on-futures-and-streams\">Layering on Futures and Streams<\/h2>\n\n<p>The next layer to add is integrating with popular traits and libraries in the\nRust ecosystem, like <code class=\"highlighter-rouge\">Future<\/code>s or <code class=\"highlighter-rouge\">serde<\/code>. For our running <code class=\"highlighter-rouge\">gloo::timers<\/code>\nexample, this means we implement a <code class=\"highlighter-rouge\">Future<\/code> backed by <code class=\"highlighter-rouge\">setTimeout<\/code>, and a\n<code class=\"highlighter-rouge\">Stream<\/code> implementation backed by <code class=\"highlighter-rouge\">setInterval<\/code>.<\/p>\n\n<div class=\"language-rust highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"k\">use<\/span> <span class=\"nn\">futures<\/span><span class=\"p\">::<\/span><span class=\"nn\">prelude<\/span><span class=\"p\">::<\/span><span class=\"o\">*<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">use<\/span> <span class=\"nn\">gloo<\/span><span class=\"p\">::<\/span><span class=\"nn\">timers<\/span><span class=\"p\">::<\/span><span class=\"nn\">futures<\/span><span class=\"p\">::<\/span><span class=\"n\">TimeoutFuture<\/span><span class=\"p\">;<\/span>\n\n<span class=\"c\">\/\/ By using futures, we can use all the future combinator methods to build up a<\/span>\n<span class=\"c\">\/\/ description of some asynchronous task.<\/span>\n<span class=\"k\">let<\/span> <span class=\"n\">my_future<\/span> <span class=\"o\">=<\/span> <span class=\"nn\">TimeoutFuture<\/span><span class=\"p\">::<\/span><span class=\"nf\">new<\/span><span class=\"p\">(<\/span><span class=\"mi\">500<\/span><span class=\"p\">)<\/span>\n    <span class=\"nf\">.and_then<\/span><span class=\"p\">(|<\/span><span class=\"n\">_<\/span><span class=\"p\">|<\/span> <span class=\"p\">{<\/span>\n        <span class=\"c\">\/\/ Do some operation after 500 milliseconds...<\/span>\n        <span class=\"nf\">do_some_operation<\/span><span class=\"p\">();<\/span>\n\n        <span class=\"c\">\/\/ and then wait another 500 milliseconds...<\/span>\n        <span class=\"nn\">TimeoutFuture<\/span><span class=\"p\">::<\/span><span class=\"nf\">new<\/span><span class=\"p\">(<\/span><span class=\"mi\">500<\/span><span class=\"p\">)<\/span>\n    <span class=\"p\">})<\/span>\n    <span class=\"nf\">.map<\/span><span class=\"p\">(|<\/span><span class=\"n\">_<\/span><span class=\"p\">|<\/span> <span class=\"p\">{<\/span>\n        <span class=\"c\">\/\/ after which we do another operation!<\/span>\n        <span class=\"nf\">do_another_operation<\/span><span class=\"p\">();<\/span>\n    <span class=\"p\">})<\/span>\n    <span class=\"nf\">.map_err<\/span><span class=\"p\">(|<\/span><span class=\"n\">err<\/span><span class=\"p\">|<\/span> <span class=\"p\">{<\/span>\n        <span class=\"nf\">handle_error<\/span><span class=\"p\">(<\/span><span class=\"n\">err<\/span><span class=\"p\">);<\/span>\n    <span class=\"p\">});<\/span>\n\n<span class=\"c\">\/\/ Spawn our future to run it!<\/span>\n<span class=\"nn\">wasm_bindgen_futures<\/span><span class=\"p\">::<\/span><span class=\"nf\">spawn_local<\/span><span class=\"p\">(<\/span><span class=\"n\">my_future<\/span><span class=\"p\">);<\/span>\n<\/code><\/pre><\/div><\/div>\n\n<p>Note that we use <code class=\"highlighter-rouge\">futures<\/code> 0.1 for now, because we\u2019ve fought tooth and nail to\nget the Wasm ecosystem on stable Rust, but as soon as the new\n<code class=\"highlighter-rouge\">std::future::Future<\/code> design is stable, we plan to switch over. We are very\nexcited for <code class=\"highlighter-rouge\">async<\/code>\/<code class=\"highlighter-rouge\">await<\/code> as well!<\/p>\n\n<h2 id=\"more-layers\">More Layers?<\/h2>\n\n<p>That\u2019s all the layers we have for the <code class=\"highlighter-rouge\">setTimeout<\/code> and <code class=\"highlighter-rouge\">setInterval<\/code>\nAPIs. Different Web APIs will have different sets of layers, and this is\nfine. Not every Web API uses callbacks, so it doesn\u2019t make sense to always have\na <code class=\"highlighter-rouge\">callbacks<\/code> module in every Gloo crate. The important part is that we are\nactively identifying layers, making them public and reusable, and building\nhigher-level layers on top of lower-level layers.<\/p>\n\n<p>We will likely add even higher-level layers to other Web APIs where it makes\nsense. For example, the <a href=\"https:\/\/github.com\/rustwasm\/gloo\/issues\/47\">File API<\/a>\u2019s <code class=\"highlighter-rouge\">FileReader<\/code> interface exposes methods\nthat you shouldn\u2019t call until after certain events have fired, and any attempt\nto call them earlier will throw. We can codify this as <a href=\"https:\/\/github.com\/fitzgen\/state_machine_future\">a state machine-based\n<code class=\"highlighter-rouge\">Future<\/code><\/a>, that doesn\u2019t even give you the ability to call\nthose methods until after the relevant events have fired and the state machine\nreaches a certain state. Leveraging types at compile time for ergonomics and\ncorrectness!<\/p>\n\n<p>Another future direction is adding more integration layers with more parts of\nthe larger Rust crates ecosystem. For example, adding functional reactive\nprogramming-style layers via <a href=\"https:\/\/github.com\/rustwasm\/gloo\/issues\/33\">the <code class=\"highlighter-rouge\">futures-signals<\/code>\ncrate<\/a> which is also used by the\n<a href=\"https:\/\/github.com\/Pauan\/rust-dominator\"><code class=\"highlighter-rouge\">dominator<\/code><\/a> framework.<\/p>\n\n<h2 id=\"events\">Events<\/h2>\n\n<p>One of the active bits of design work going on in Gloo right now is how to craft\nour event targets and listeners layer. Events are used across most of the Web\nAPIs, so it is very important we get this design right, as it will sit\nunderneath many of our other crates. While we haven\u2019t 100% nailed down the\ndesign yet, I really like where we are headed.<\/p>\n\n<p>On top of <a href=\"https:\/\/docs.rs\/web-sys\/0.3.17\/web_sys\/struct.Event.html\"><code class=\"highlighter-rouge\">web_sys::Event<\/code><\/a> and\n<a href=\"https:\/\/docs.rs\/web-sys\/0.3.17\/web_sys\/struct.EventTarget.html#method.add_event_listener_with_callback\"><code class=\"highlighter-rouge\">web_sys::EventTarget::add_event_listener_with_callback<\/code><\/a>,\nwe are building a layer for <a href=\"https:\/\/github.com\/rustwasm\/gloo\/issues\/30\">adding and removing event\nlisteners<\/a> and managing their lifetimes from Rust via RAII-style\nautomatic cleanup upon drop.<\/p>\n\n<p>We can use this API to make idiomatic Rust types that attach event listeners\nthat automatically get removed from the DOM when the type is dropped:<\/p>\n\n<div class=\"language-rust highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"k\">use<\/span> <span class=\"nn\">futures<\/span><span class=\"p\">::<\/span><span class=\"nn\">sync<\/span><span class=\"p\">::<\/span><span class=\"n\">oneshot<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">use<\/span> <span class=\"nn\">gloo<\/span><span class=\"p\">::<\/span><span class=\"nn\">events<\/span><span class=\"p\">::<\/span><span class=\"n\">EventListener<\/span><span class=\"p\">;<\/span>\n\n<span class=\"c\">\/\/ A prompt for the user.<\/span>\n<span class=\"k\">pub<\/span> <span class=\"k\">struct<\/span> <span class=\"n\">Prompt<\/span> <span class=\"p\">{<\/span>\n    <span class=\"n\">receiver<\/span><span class=\"p\">:<\/span> <span class=\"nn\">oneshot<\/span><span class=\"p\">::<\/span><span class=\"n\">Receiver<\/span><span class=\"o\">&lt;<\/span><span class=\"nb\">String<\/span><span class=\"o\">&gt;<\/span><span class=\"p\">,<\/span>\n\n    <span class=\"c\">\/\/ Automatically removed from the DOM on drop!<\/span>\n    <span class=\"n\">listener<\/span><span class=\"p\">:<\/span> <span class=\"n\">EventListener<\/span><span class=\"p\">,<\/span>\n<span class=\"p\">}<\/span>\n\n<span class=\"k\">impl<\/span> <span class=\"n\">Prompt<\/span> <span class=\"p\">{<\/span>\n    <span class=\"k\">pub<\/span> <span class=\"k\">fn<\/span> <span class=\"nf\">new<\/span><span class=\"p\">()<\/span> <span class=\"k\">-&gt;<\/span> <span class=\"n\">Prompt<\/span> <span class=\"p\">{<\/span>\n        <span class=\"c\">\/\/ Create an `&lt;input&gt;` to prompt the user for something and attach it to the DOM.<\/span>\n        <span class=\"k\">let<\/span> <span class=\"n\">input<\/span><span class=\"p\">:<\/span> <span class=\"nn\">web_sys<\/span><span class=\"p\">::<\/span><span class=\"n\">HtmlInputElement<\/span> <span class=\"o\">=<\/span> <span class=\"nd\">unimplemented!<\/span><span class=\"p\">();<\/span>\n\n        <span class=\"c\">\/\/ Create a oneshot channel for sending\/receiving the user's input.<\/span>\n        <span class=\"k\">let<\/span> <span class=\"p\">(<\/span><span class=\"n\">sender<\/span><span class=\"p\">,<\/span> <span class=\"n\">receiver<\/span><span class=\"p\">)<\/span> <span class=\"o\">=<\/span> <span class=\"nn\">oneshot<\/span><span class=\"p\">::<\/span><span class=\"nf\">channel<\/span><span class=\"p\">();<\/span>\n\n        <span class=\"c\">\/\/ Attach an event listener to the input element.<\/span>\n        <span class=\"k\">let<\/span> <span class=\"n\">listener<\/span> <span class=\"o\">=<\/span> <span class=\"nn\">EventListener<\/span><span class=\"p\">::<\/span><span class=\"nf\">new<\/span><span class=\"p\">(<\/span><span class=\"o\">&amp;<\/span><span class=\"n\">input<\/span><span class=\"p\">,<\/span> <span class=\"s\">\"input\"<\/span><span class=\"p\">,<\/span> <span class=\"k\">move<\/span> <span class=\"p\">|<\/span><span class=\"n\">_event<\/span><span class=\"p\">:<\/span> <span class=\"o\">&amp;<\/span><span class=\"nn\">web_sys<\/span><span class=\"p\">::<\/span><span class=\"n\">Event<\/span><span class=\"p\">|<\/span> <span class=\"p\">{<\/span>\n            <span class=\"c\">\/\/ Get the input element's value.<\/span>\n            <span class=\"k\">let<\/span> <span class=\"n\">value<\/span> <span class=\"o\">=<\/span> <span class=\"n\">input<\/span><span class=\"nf\">.value<\/span><span class=\"p\">();<\/span>\n\n            <span class=\"c\">\/\/ Send the input value over the oneshot channel.<\/span>\n            <span class=\"n\">sender<\/span><span class=\"nf\">.send<\/span><span class=\"p\">(<\/span><span class=\"n\">value<\/span><span class=\"p\">)<\/span>\n                <span class=\"nf\">.expect_throw<\/span><span class=\"p\">(<\/span>\n                    <span class=\"s\">\"receiver should not be dropped without first removing DOM listener\"<\/span>\n                <span class=\"p\">);<\/span>\n        <span class=\"p\">});<\/span>\n\n        <span class=\"n\">Prompt<\/span> <span class=\"p\">{<\/span>\n            <span class=\"n\">receiver<\/span><span class=\"p\">,<\/span>\n            <span class=\"n\">listener<\/span><span class=\"p\">,<\/span>\n        <span class=\"p\">}<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n\n<span class=\"c\">\/\/ A `Prompt` is also a future, that resolves after the user input!<\/span>\n<span class=\"k\">impl<\/span> <span class=\"n\">Future<\/span> <span class=\"k\">for<\/span> <span class=\"n\">Prompt<\/span> <span class=\"p\">{<\/span>\n    <span class=\"k\">type<\/span> <span class=\"n\">Item<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">String<\/span><span class=\"p\">;<\/span>\n    <span class=\"k\">type<\/span> <span class=\"n\">Error<\/span> <span class=\"o\">=<\/span> <span class=\"p\">();<\/span>\n\n    <span class=\"k\">fn<\/span> <span class=\"nf\">poll<\/span><span class=\"p\">(<\/span><span class=\"o\">&amp;<\/span><span class=\"k\">mut<\/span> <span class=\"k\">self<\/span><span class=\"p\">)<\/span> <span class=\"k\">-&gt;<\/span> <span class=\"n\">Poll<\/span><span class=\"o\">&lt;<\/span><span class=\"nn\">Self<\/span><span class=\"p\">::<\/span><span class=\"n\">Item<\/span><span class=\"p\">,<\/span> <span class=\"nn\">Self<\/span><span class=\"p\">::<\/span><span class=\"n\">Error<\/span><span class=\"o\">&gt;<\/span> <span class=\"p\">{<\/span>\n        <span class=\"k\">self<\/span><span class=\"py\">.receiver<\/span>\n            <span class=\"nf\">.poll<\/span><span class=\"p\">()<\/span>\n            <span class=\"nf\">.map_err<\/span><span class=\"p\">(|<\/span><span class=\"n\">_<\/span><span class=\"p\">|<\/span> <span class=\"p\">{<\/span>\n                <span class=\"nd\">unreachable!<\/span><span class=\"p\">(<\/span>\n                    <span class=\"s\">\"we don't drop the sender without either sending a value or dropping the whole Prompt\"<\/span>\n                <span class=\"p\">)<\/span>\n            <span class=\"p\">})<\/span>\n    <span class=\"p\">}<\/span>\n<span class=\"p\">}<\/span>\n<\/code><\/pre><\/div><\/div>\n\n<p>On top of that layer, we are using Rust\u2019s trait system to design <a href=\"https:\/\/github.com\/rustwasm\/gloo\/issues\/43\">a\nhigher-level, static events API<\/a> that will make the events\ncasting safe and statically-checked, and make sure you don\u2019t have typos in the\nevent types that you listen to:<\/p>\n\n<div class=\"language-rust highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"k\">use<\/span> <span class=\"nn\">gloo<\/span><span class=\"p\">::<\/span><span class=\"nn\">events<\/span><span class=\"p\">::{<\/span><span class=\"n\">ClickEvent<\/span><span class=\"p\">,<\/span> <span class=\"n\">on<\/span><span class=\"p\">};<\/span>\n\n<span class=\"c\">\/\/ Get an event target from somewhere.<\/span>\n<span class=\"k\">let<\/span> <span class=\"n\">target<\/span><span class=\"p\">:<\/span> <span class=\"nn\">web_sys<\/span><span class=\"p\">::<\/span><span class=\"n\">EventTarget<\/span> <span class=\"o\">=<\/span> <span class=\"nd\">unimplemented!<\/span><span class=\"p\">();<\/span>\n\n<span class=\"c\">\/\/ Listen to the \"click\" event, know that you didn't misspell the event as<\/span>\n<span class=\"c\">\/\/ \"clik\", and also get a nicer event type!<\/span>\n<span class=\"k\">let<\/span> <span class=\"n\">click_listener<\/span> <span class=\"o\">=<\/span> <span class=\"nf\">on<\/span><span class=\"p\">(<\/span><span class=\"o\">&amp;<\/span><span class=\"n\">target<\/span><span class=\"p\">,<\/span> <span class=\"k\">move<\/span> <span class=\"p\">|<\/span><span class=\"n\">e<\/span><span class=\"p\">:<\/span> <span class=\"o\">&amp;<\/span><span class=\"n\">ClickEvent<\/span><span class=\"p\">|<\/span> <span class=\"p\">{<\/span>\n    <span class=\"c\">\/\/ The `ClickEvent` type has nice getters for the `MouseEvent` that<\/span>\n    <span class=\"c\">\/\/ `\"click\"` events are guaranteed to yield. No need to dynamically cast<\/span>\n    <span class=\"c\">\/\/ an `Event` to a `MouseEvent`.<\/span>\n    <span class=\"k\">let<\/span> <span class=\"p\">(<\/span><span class=\"n\">x<\/span><span class=\"p\">,<\/span> <span class=\"n\">y<\/span><span class=\"p\">)<\/span> <span class=\"o\">=<\/span> <span class=\"n\">event<\/span><span class=\"nf\">.mouse_position<\/span><span class=\"p\">();<\/span>\n\n    <span class=\"c\">\/\/ ...<\/span>\n<span class=\"p\">});<\/span>\n<\/code><\/pre><\/div><\/div>\n\n<p>These event APIs are still works in progress and have some kinks to work out,\nbut I\u2019m very excited for them, and we hope to get a lot of mileage out of them\nas we build other Gloo crates that internally use them.<\/p>\n\n<h2 id=\"get-involved\">Get Involved!<\/h2>\n\n<p>Let\u2019s build Gloo together! Want to get involved?<\/p>\n\n<ul>\n  <li><a href=\"https:\/\/discord.gg\/rust-lang\">Join the <code class=\"highlighter-rouge\">#WG-wasm<\/code> channel on the Rust Discord server!<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/gloo\">Follow the <code class=\"highlighter-rouge\">rustwasm\/gloo<\/code> repository on GitHub and check out its\n<code class=\"highlighter-rouge\">CONTRIBUTING.md<\/code><\/a><\/li>\n<\/ul>","author":{"name":"Nick Fitzgerald"},"summary":"About two weeks ago, we kicked off our effort to collectively build Gloo, a modular toolkit for building fast and reliable Web apps and libraries with Rust and Wasm. We knew we wanted to explicitly cultivate the Rust and Wasm library ecosystem by spinning out reusable, standalone libraries: things that would help you out whether you were writing a green-field Web app in pure-Rust, building your own framework, or surgically inserting some Rust-generated Wasm into an existing JavaScript project. What was still fuzzy, and which we didn\u2019t know yet, was how we were going design and expose these reusable bits."},{"title":"This Week in Rust and WebAssembly 14","link":{"@attributes":{"href":"https:\/\/rustwasm.github.io\/2019\/03\/21\/this-week-in-rust-and-wasm-014.html","rel":"alternate","type":"text\/html","title":"This Week in Rust and WebAssembly 14"}},"published":"2019-03-21T00:00:00+00:00","updated":"2019-03-21T00:00:00+00:00","id":"https:\/\/rustwasm.github.io\/2019\/03\/21\/this-week-in-rust-and-wasm-014","content":"<p>Hello and welcome to another issue of <em>This Week in Rust and WebAssembly<\/em>!<\/p>\n\n<p><a href=\"https:\/\/rust-lang.org\">Rust<\/a> is a systems language pursuing the trifecta:\nsafety, concurrency, and speed.<\/p>\n\n<p><a href=\"http:\/\/webassembly.org\">WebAssembly<\/a> is a stack-based virtual machine and\ninstruction set. It is fast, safe, portable, and part of the open Web\nplatform. By compiling to WebAssembly, we can run Rust code on the Web!<\/p>\n\n<p>This is a weekly summary of Rust and WebAssembly\u2019s progress and community.<\/p>\n\n<p>Did we miss something? Tweet to us at <a href=\"https:\/\/twitter.com\/rustwasm\">@rustwasm<\/a>\nor <a href=\"https:\/\/github.com\/rustwasm\/rustwasm.github.io\">send us a pull request<\/a>.<\/p>\n\n<p><strong>Want to get involved in Rust and WebAssembly? <a href=\"https:\/\/github.com\/rustwasm\/team\/blob\/master\/README.md#get-involved\">Join the Rust and WebAssembly working group!<\/a><\/strong><\/p>\n\n<h2 id=\"news-and-blog-posts-from-around-the-web\">News and Blog Posts from Around the Web<\/h2>\n\n<p><em>Want to make sure something ends up on this list next time we publish an issue?\n<a href=\"https:\/\/github.com\/rustwasm\/team\/issues\/79\">Leave a comment on this issue.<\/a><\/em><\/p>\n\n<ul>\n  <li><a href=\"https:\/\/hacks.mozilla.org\/2019\/03\/fast-bump-allocated-virtual-doms-with-rust-and-wasm\/\"><strong>Fast, Bump-Allocated Virtual DOMs with Rust and\nWasm<\/strong><\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/David-OConnor\/seed\/blob\/master\/CHANGELOG.md#v030\">Version 0.3 of the <code class=\"highlighter-rouge\">seed<\/code> framework was\nreleased<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/web-dom\/web-dom\"><code class=\"highlighter-rouge\">web-dom<\/code> is an alternative way to access the DOM from\nRust<\/a><\/li>\n  <li><a href=\"https:\/\/twitter.com\/ensembl\/status\/1106140169575514113\">Ensembl 2020 (a genome browser) will use Rust and\nWasm<\/a><\/li>\n  <li><a href=\"https:\/\/users.rust-lang.org\/t\/another-small-step-to-wasm-compatibility-actix-actors-in-the-browser\/26318\">The <code class=\"highlighter-rouge\">actix<\/code> project is working on getting their actors running as Wasm on the\nWeb<\/a><\/li>\n  <li><a href=\"https:\/\/twitter.com\/alesgeno\/status\/1107662063168614400\">Demo: a real-time pitch detector Web application (and reusable library\ncrate!) made with Rust and\nWasm<\/a><\/li>\n  <li><a href=\"https:\/\/rust.godbolt.org\/z\/PZqG56\">The Godbolt Compiler Explorer can show Wasm disassembly, with color-coded\nhighlighting showing which Rust source text compiled into which Wasm\ninstructions<\/a><\/li>\n<\/ul>\n\n<h2 id=\"updates-from-rustwasm\">Updates from <a href=\"https:\/\/github.com\/rustwasm\"><code class=\"highlighter-rouge\">rustwasm\/*<\/code><\/a><\/h2>\n\n<h3 id=\"rfcs\">RFCs<\/h3>\n\n<h4 id=\"new-rfcs\">New RFCs<\/h4>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/rfcs\/pull\/10\">Add <code class=\"highlighter-rouge\">watch<\/code> and <code class=\"highlighter-rouge\">serve<\/code> subcommands to\n<code class=\"highlighter-rouge\">wasm-pack<\/code><\/a><\/li>\n<\/ul>\n\n<h4 id=\"final-comment-period-rfcs\">Final Comment Period RFCs<\/h4>\n\n<p>None.<\/p>\n\n<h4 id=\"merged-rfcs\">Merged RFCs<\/h4>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/rfcs\/pull\/7\"><strong>2019 Roadmap \ud83c\udf89<\/strong><\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/rfcs\/pull\/8\">Enable depending on NPM packages<\/a><\/li>\n<\/ul>\n\n<h3 id=\"working-group-meetings\">Working Group Meetings<\/h3>\n\n<ul>\n  <li><a href=\"https:\/\/youtu.be\/uYySHPCuLz0\">Watch the recording of this week\u2019s working group meeting on\nYouTube<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/team\/issues\/262\">Come join us at next week\u2019s working group\nmeeting!<\/a><\/li>\n<\/ul>\n\n<h3 id=\"gloo\">Gloo<\/h3>\n\n<ul>\n  <li><a href=\"https:\/\/rustwasm.github.io\/2019\/03\/12\/lets-build-gloo-together.html\">Gloo is the modular toolkit we decided to collectively build in our 2019\nroadmap.<\/a>\nWe\u2019ve been having lots of good discussion about scope and API design in issue\nthreads! (Not doing lots of PRs quite yet.)<\/li>\n  <li>@OddCoincidence <a href=\"https:\/\/github.com\/rustwasm\/gloo\/pull\/24\">added support for\n<code class=\"highlighter-rouge\">setInterval<\/code><\/a> to <code class=\"highlighter-rouge\">gloo-timers<\/code>.<\/li>\n<\/ul>\n\n<h3 id=\"rustwasmgithubio\"><code class=\"highlighter-rouge\">rustwasm.github.io<\/code><\/h3>\n\n<ul>\n  <li>@DebugSteven <a href=\"https:\/\/github.com\/rustwasm\/rustwasm.github.io\/pull\/43\">removed some unused CSS\nrules<\/a> from our\nWebsite\u2019s stylesheets.<\/li>\n<\/ul>\n\n<h3 id=\"rust-webpack-template\"><code class=\"highlighter-rouge\">rust-webpack-template<\/code><\/h3>\n\n<ul>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/rust-webpack-template\/pull\/120\">upgraded the\ntemplate<\/a> to the\nRust 2018 edition.<\/li>\n<\/ul>\n\n<h3 id=\"twiggy\">Twiggy<\/h3>\n\n<ul>\n  <li>@data-pup <a href=\"https:\/\/github.com\/rustwasm\/twiggy\/pull\/265\">upgraded Twiggy<\/a> to\nthe Rust 2018 edition.<\/li>\n  <li>@data-pup <a href=\"https:\/\/github.com\/rustwasm\/twiggy\/pull\/268\">added more tests<\/a> for\nthe <code class=\"highlighter-rouge\">twiggy diff<\/code> subcommand.<\/li>\n<\/ul>\n\n<h3 id=\"wasm-bindgen\"><code class=\"highlighter-rouge\">wasm-bindgen<\/code><\/h3>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/blob\/master\/CHANGELOG.md#0239\"><strong>We released <code class=\"highlighter-rouge\">wasm-bindgen<\/code> version 0.2.39!\n\ud83c\udf89<\/strong><\/a><\/li>\n  <li>@c410-f3r made <code class=\"highlighter-rouge\">wasm-bindgen<\/code>\u2019s generated TypeScript interfaces\u2019 functions\u2019\nargument names be <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1344\">preserved from the Rust\nsource<\/a> instead of being\ngenerated symbols.<\/li>\n  <li>@ibaryshnikov <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1336\">cleaned up<\/a>\nour Web GL example.<\/li>\n  <li>@nstoddard <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1333\">added immutability\nwhitelisting<\/a> for\n<code class=\"highlighter-rouge\">Uint8Array<\/code>, <code class=\"highlighter-rouge\">ArrayBufferView<\/code>, and <code class=\"highlighter-rouge\">BufferSource<\/code>.<\/li>\n  <li>@RReverser <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1372\">fixed some copy-paste\nerrors<\/a> in documentation\nfor <code class=\"highlighter-rouge\">Int32Array<\/code> and <code class=\"highlighter-rouge\">Uint32Array<\/code><\/li>\n  <li>@RReverser <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1371\">cleaned up and de-duplicated our binding\ndefinitions<\/a> to the\ndifferent kinds of typed arrays!<\/li>\n  <li>@c410-f3r <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1356\">expanded the\ntesting<\/a> of our emitted\nTypeScript interface definitions.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1353\">added the <code class=\"highlighter-rouge\">#[wasm_bindgen(raw_module = \"...\")]<\/code>\nattribute<\/a> to the\n<code class=\"highlighter-rouge\">wasm-bindgen<\/code> proc-macro.<\/li>\n  <li>@konradsz <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1351\">fixed the number-slices example\u2019s JS\nimports.<\/a><\/li>\n  <li>@alexlapa <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1350\">enabled passing optional imported\n<code class=\"highlighter-rouge\">enum<\/code>s<\/a> over the FFI\nboundary.<\/li>\n<\/ul>\n\n<h3 id=\"wasm-pack\"><code class=\"highlighter-rouge\">wasm-pack<\/code><\/h3>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/blob\/master\/CHANGELOG.md#%EF%B8%8F-070\"><strong>We released <code class=\"highlighter-rouge\">wasm-pack<\/code> version 0.7.0!\n\ud83c\udf89<\/strong><\/a><\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/567\">added support for the <code class=\"highlighter-rouge\">web<\/code>\ntarget<\/a> to <code class=\"highlighter-rouge\">wasm-pack<\/code>. This\ntarget uses browsers\u2019 native support for ES modules, and doesn\u2019t require the\nuse of a JS bundler.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/547\">started migrating <code class=\"highlighter-rouge\">wasm-pack<\/code>\u2019s CLI\noutput<\/a> towards our 1.0 vision\nfor <code class=\"highlighter-rouge\">wasm-pack<\/code> output. Notably, <code class=\"highlighter-rouge\">cargo build<\/code>\u2019s colors and progress bar\nshould work now.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/590\">added a\nsmorgasbord<\/a> of docs\nimprovements.<\/li>\n  <li>@drager <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/552\">added support for non-<code class=\"highlighter-rouge\">rustup<\/code>-based Rust development\nenvironments<\/a> to <code class=\"highlighter-rouge\">wasm-pack<\/code>.<\/li>\n  <li>@ashleygwilliams <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/576\">added a quickstart doc\npage<\/a> for using <code class=\"highlighter-rouge\">wasm-pack<\/code>\nwith Webpack.<\/li>\n<\/ul>\n\n<h3 id=\"wasm-pack-template\"><code class=\"highlighter-rouge\">wasm-pack-template<\/code><\/h3>\n\n<ul>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack-template\/pull\/37\">upgraded the\ntemplate<\/a> to the Rust\n2018 edition.<\/li>\n<\/ul>\n\n<h2 id=\"requests-for-contribution\">Requests for Contribution<\/h2>\n\n<p><strong>Want to get involved in Rust and WebAssembly? <a href=\"https:\/\/github.com\/rustwasm\/team\/blob\/master\/README.md#get-involved\">Join the Rust and WebAssembly\nworking group!<\/a><\/strong><\/p>\n\n<ul>\n  <li><a href=\"https:\/\/rustwasm.github.io\/2019\/03\/12\/lets-build-gloo-together.html\"><strong>Let\u2019s Build Gloo\nTogether<\/strong><\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/issues?q=is%3Aopen+is%3Aissue+user%3Arustwasm+archived%3Afalse+label%3A%22good+first+issue%22\">All issues labeled \u201cgood first issue\u201d in the <code class=\"highlighter-rouge\">rustwasm\/*<\/code>\nrepositories<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/issues?q=is%3Aopen+is%3Aissue+user%3Arustwasm+archived%3Afalse+label%3A%22help+wanted%22\">All issues labeled \u201chelp wanted\u201d in the <code class=\"highlighter-rouge\">rustwasm\/*<\/code>\nrepositories<\/a><\/li>\n<\/ul>\n\n<h3 id=\"new-good-first-issues\">New Good First Issues<\/h3>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/gloo\/issues\/36\">Gloo: Make the timers crate follow submodule\ndesign<\/a><\/li>\n<\/ul>","author":{"name":{}},"summary":"Hello and welcome to another issue of This Week in Rust and WebAssembly!"},{"title":"Let\u2019s Build Gloo Together","link":{"@attributes":{"href":"https:\/\/rustwasm.github.io\/2019\/03\/12\/lets-build-gloo-together.html","rel":"alternate","type":"text\/html","title":"Let's Build Gloo Together"}},"published":"2019-03-12T00:00:00+00:00","updated":"2019-03-12T00:00:00+00:00","id":"https:\/\/rustwasm.github.io\/2019\/03\/12\/lets-build-gloo-together","content":"<p>The Rust and WebAssembly domain working group wants to cultivate a stable,\nbatteries-available, and production-ready ecosystem for <a href=\"https:\/\/github.com\/rustwasm\/rfcs\/pull\/7\">Rust and Wasm\ndevelopment in 2019<\/a>.<\/p>\n\n<p>To further that goal, we are creating <a href=\"https:\/\/github.com\/rustwasm\/gloo\">Gloo<\/a>, a modular toolkit for building\nboth:<\/p>\n\n<ul>\n  <li>\n    <p>small, targeted Wasm modules that integrate into a larger JavaScript system,\nand<\/p>\n  <\/li>\n  <li>\n    <p>whole Web applications written in Rust.<\/p>\n  <\/li>\n<\/ul>\n\n<p>Gloo\u2019s goals for Wasm are similar to what the Async Ecosystem working group\u2019s\n<a href=\"https:\/\/rustasync.github.io\/team\/2018\/09\/11\/tide.html\">Tide<\/a> project intends to do for server-side Web development:<\/p>\n\n<blockquote>\n  <p>The name \u201cTide\u201d refers to \u201ca rising tide lifts all boats\u201d; the intent is to\nimprove sharing, compatibility, and improvements across all web development\nand frameworks in Rust.<\/p>\n<\/blockquote>\n\n<h2 id=\"the-utility-high-level-libraries-and-frameworks-provide\">The Utility High-Level Libraries and Frameworks Provide<\/h2>\n\n<p>We use high-level libraries and frameworks instead of using Web APIs directly\nbecause we want abstractions with which we can naturally express ourselves. We\noutsource non-business logic concerns so that we can create more robust\nlibraries and applications more quickly than we otherwise would. For example,\nthe desires people might have include:<\/p>\n\n<ul>\n  <li>\n    <p>They prefer describing how they want the DOM to look like right now, rather\nthan enumerating a list of modifications that will transform its current state\ninto their desired state. Therefore, they use an immediate-mode virtual DOM\nlibrary.<\/p>\n  <\/li>\n  <li>\n    <p>They prefer thinking in terms of Rust types, not about the raw, serialized\nbytes in a <code class=\"highlighter-rouge\">fetch<\/code>ed HTTP response body or about object stores in Indexed DB.\nTherefore, they use <code class=\"highlighter-rouge\">derive<\/code>-based serialization and deserialization with\n<code class=\"highlighter-rouge\">serde<\/code>.<\/p>\n  <\/li>\n<\/ul>\n\n<p>There are many different ways to approach high-level APIs, and people have lots\nof differing opinions about which way is best! Designing these APIs well is\ndifficult: we have correctness, ergonomic, and performance concerns.<\/p>\n\n<h2 id=\"how-gloo-fits-in\">How Gloo Fits In<\/h2>\n\n<p>Gloo aims to be both a collection of small, focused utility crates and an\numbrella crate that pulls all the utilities together into a single package.<\/p>\n\n<p>Our goals with Gloo are:<\/p>\n\n<ul>\n  <li>\n    <p><strong>To bolster the Rust and WebAssembly crates ecosystem.<\/strong> Pick and choose\nutility crates even if you aren\u2019t using the whole umbrella Gloo crate, or if\nyou are using some other Rust and Wasm framework. We have some crates like\nthis today \u2014 for example <a href=\"https:\/\/crates.io\/crates\/console_log\">the <code class=\"highlighter-rouge\">console_log<\/code> crate<\/a> \u2014\nbut we would like to intentionally grow more shared utility crates across the\necosystem.<\/p>\n  <\/li>\n  <li>\n    <p><strong>To wrap these utilities up in an umbrella crate so that your new project can\nhit the ground running.<\/strong> This umbrella crate will be a thin wrapper around\nthe utility crates, and provides defaults wherever multiple (perhaps\nopinionated) choices exist. To keep the umbrella crate small, we should be\nconstantly pulling code out into new shared, utility crates. For the more\nopinionated bits, like virtual DOM rendering or web components, the umbrella\ncrate should prefer interfaces over implementations, so that different\nimplementations with different approaches are swap-able.<\/p>\n  <\/li>\n<\/ul>\n\n<p>Gloo is far from ready right now! The project has only just begun. But we want\nto build Gloo as a collective and in an open way, so we are announcing it early\nand inviting you to come help us design and build it.<\/p>\n\n<p>Want to get involved?<\/p>\n\n<ul>\n  <li><a href=\"https:\/\/discord.gg\/rust-lang\">Join the <code class=\"highlighter-rouge\">#WG-wasm<\/code> channel on the Rust Discord server!<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/gloo\">Follow the <code class=\"highlighter-rouge\">rustwasm\/gloo<\/code> repository on GitHub<\/a><\/li>\n<\/ul>\n\n<h2 id=\"where-were-starting\">Where We\u2019re Starting<\/h2>\n\n<p><a href=\"https:\/\/rustwasm.github.io\/2019\/02\/13\/this-week-in-rust-and-wasm-010.html#wasm-at-the-2019-rust-all-hands\">At the 2019 Rust All Hands meeting in Berlin<\/a>, we found that it was\nuseful to categorize Web libraries by whether they were opinionated or not. We\nall want idiomatic-Rust wrapper crates around raw <code class=\"highlighter-rouge\">web-sys<\/code> timers and\n<code class=\"highlighter-rouge\">requestAnimationFrame<\/code> etc, and there isn\u2019t a <em>whole lot<\/em> of design work that\nneeds to happen for this. For many of these kinds of crates, we are ready to\ndive into implementation. On the other hand, for the more opinionated bits, like\nvirtual DOMs and state management, we need to do exploratory design work before\ncommitting to a particular approach.<\/p>\n\n<p>We\u2019ll start exploring the design space of the latter group in a series of follow\nup blog posts. In the meantime, if you want to get involved, start hacking on\nsome of the utility crates, or brainstorm about designs, then <a href=\"https:\/\/github.com\/rustwasm\/gloo\/issues\">check out some of\nthe issues<\/a> on Gloo\u2019s GitHub repository.<\/p>","author":{"name":"Nick Fitzgerald"},"summary":"The Rust and WebAssembly domain working group wants to cultivate a stable, batteries-available, and production-ready ecosystem for Rust and Wasm development in 2019."},{"title":"This Week in Rust and WebAssembly 13","link":{"@attributes":{"href":"https:\/\/rustwasm.github.io\/2019\/03\/07\/this-week-in-rust-and-wasm-013.html","rel":"alternate","type":"text\/html","title":"This Week in Rust and WebAssembly 13"}},"published":"2019-03-07T00:00:00+00:00","updated":"2019-03-07T00:00:00+00:00","id":"https:\/\/rustwasm.github.io\/2019\/03\/07\/this-week-in-rust-and-wasm-013","content":"<p>Hello and welcome to another issue of <em>This Week in Rust and WebAssembly<\/em>!<\/p>\n\n<p><a href=\"https:\/\/rust-lang.org\">Rust<\/a> is a systems language pursuing the trifecta:\nsafety, concurrency, and speed.<\/p>\n\n<p><a href=\"http:\/\/webassembly.org\">WebAssembly<\/a> is a stack-based virtual machine and\ninstruction set. It is fast, safe, portable, and part of the open Web\nplatform. By compiling to WebAssembly, we can run Rust code on the Web!<\/p>\n\n<p>This is a weekly summary of Rust and WebAssembly\u2019s progress and community.<\/p>\n\n<p>Did we miss something? Tweet to us at <a href=\"https:\/\/twitter.com\/rustwasm\">@rustwasm<\/a>\nor <a href=\"https:\/\/github.com\/rustwasm\/rustwasm.github.io\">send us a pull request<\/a>.<\/p>\n\n<p><strong>Want to get involved in Rust and WebAssembly? <a href=\"https:\/\/github.com\/rustwasm\/team\/blob\/master\/README.md#get-involved\">Join the Rust and WebAssembly working group!<\/a><\/strong><\/p>\n\n<!-- TODO: check recent r\/rust and users.rust-lang.org posts for \"wasm\" and \"webassembly\": -->\n<!-- https:\/\/twitter.com\/rustwasm -->\n\n<h2 id=\"news-and-blog-posts-from-around-the-web\">News and Blog Posts from Around the Web<\/h2>\n\n<p><em>Want to make sure something ends up on this list next time we publish an issue?\n<a href=\"https:\/\/github.com\/rustwasm\/team\/issues\/79\">Leave a comment on this issue.<\/a><\/em><\/p>\n\n<ul>\n  <li><a href=\"https:\/\/prestonrichey.com\/blog\/react-rust-wasm\/\">Up and Running with React, Rust, and\nWasm<\/a><\/li>\n  <li>The Tao of Rust is a book about Rust that was originally published in\nChina. It has a WebAssembly section, and is <a href=\"https:\/\/www.reddit.com\/r\/rust\/comments\/ax86y1\/introducing_the_book_the_tao_of_rust\/\">getting translated into\nEnglish<\/a>!<\/li>\n  <li><a href=\"https:\/\/github.com\/wasm-network\/tweek-rust\">Tweek is a new tween animation kit for Rust that supports\nWasm<\/a><\/li>\n<\/ul>\n\n<h2 id=\"updates-from-rustwasm\">Updates from <a href=\"https:\/\/github.com\/rustwasm\"><code class=\"highlighter-rouge\">rustwasm\/*<\/code><\/a><\/h2>\n\n<h3 id=\"rfcs\">RFCs<\/h3>\n\n<h4 id=\"new-rfcs\">New RFCs<\/h4>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/rfcs\/pull\/9\">Amend the RFC process<\/a><\/li>\n<\/ul>\n\n<h4 id=\"final-comment-period-rfcs\">Final Comment Period RFCs<\/h4>\n\n<p>None.<\/p>\n\n<h4 id=\"merged-rfcs\">Merged RFCs<\/h4>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/rfcs\/pull\/6\">Add support for local JavaScript snippets to <code class=\"highlighter-rouge\">wasm-bindgen<\/code><\/a><\/li>\n<\/ul>\n\n<h3 id=\"working-group-meetings\">Working Group Meetings<\/h3>\n\n<ul>\n  <li><a href=\"https:\/\/youtu.be\/sQE6IjnzwS8\">Watch the recording of this week\u2019s working group meeting on\nYouTube<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/team\/issues\/260\">Come join us at next week\u2019s working group\nmeeting!<\/a><\/li>\n<\/ul>\n\n<h3 id=\"rustwasmgithubio\"><code class=\"highlighter-rouge\">rustwasm.github.io<\/code><\/h3>\n\n<ul>\n  <li>@DebugSteven and @alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/rustwasm.github.io\/pull\/41\">aggregated the Rust and WebAssembly book, the\n<code class=\"highlighter-rouge\">wasm-bindgen<\/code> guide, and the <code class=\"highlighter-rouge\">wasm-pack<\/code> guide into a single\nbookshelf<\/a>, where all\nof our docs can be found in one place!<\/li>\n<\/ul>\n\n<h3 id=\"twiggy\"><code class=\"highlighter-rouge\">twiggy<\/code><\/h3>\n\n<ul>\n  <li>@data-pup <a href=\"https:\/\/github.com\/rustwasm\/twiggy\/pull\/253\">added <code class=\"highlighter-rouge\">rustfmt<\/code> and <code class=\"highlighter-rouge\">clippy<\/code>\nintegration<\/a> into Twiggy\u2019s CI\nsetup.<\/li>\n  <li>@sepiropht <a href=\"https:\/\/github.com\/rustwasm\/twiggy\/pull\/260\">improved Twiggy\u2019s\ndetection<\/a> of what kind of binary\nit is looking at when there is no file extension.<\/li>\n<\/ul>\n\n<h3 id=\"walrus\"><code class=\"highlighter-rouge\">walrus<\/code><\/h3>\n\n<ul>\n  <li>@data-pup <a href=\"https:\/\/github.com\/rustwasm\/walrus\/pull\/64\">fixed the wasm round-tripping\ntests<\/a> for the latest release of\nthe <code class=\"highlighter-rouge\">webassembly\/wabt<\/code> tools.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/walrus\/pull\/66\">added support<\/a> for\nthe WebAssembly SIMD proposal to <code class=\"highlighter-rouge\">walrus<\/code>.<\/li>\n<\/ul>\n\n<h3 id=\"wasm-bindgen\"><code class=\"highlighter-rouge\">wasm-bindgen<\/code><\/h3>\n\n<ul>\n  <li>@fitzgen <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1281\">added support for <code class=\"highlighter-rouge\">FnOnce<\/code>\nfunctions<\/a> to\n<code class=\"highlighter-rouge\">wasm_bindgen::Closure<\/code>.<\/li>\n  <li>@c410-f3r <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1331\">fixed <code class=\"highlighter-rouge\">wasm-bindgen<\/code>\ncompilation<\/a> when the\n<code class=\"highlighter-rouge\">\"extra-traits\"<\/code> feature was enabled.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1295\">implemented the local JavaScript snippets\nRFC<\/a> for <code class=\"highlighter-rouge\">wasm-bindgen<\/code>.<\/li>\n  <li>@Vlad-Scherbina <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1330\">fixed a\nbug<\/a> where if the\ndirectory specified by <code class=\"highlighter-rouge\">--out-dir<\/code> does not exist, then running the\n<code class=\"highlighter-rouge\">wasm-bindgen<\/code> CLI would fail.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1314\">added\ntesting<\/a> of\n<code class=\"highlighter-rouge\">wasm-bindgen<\/code>\u2019s generated TypeScript interface definition files in CI.<\/li>\n<\/ul>\n\n<h3 id=\"wasm-pack\"><code class=\"highlighter-rouge\">wasm-pack<\/code><\/h3>\n\n<ul>\n  <li>@drager <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/517\">wrote a test suite<\/a>\nfor <code class=\"highlighter-rouge\">wasm-pack<\/code>\u2019s binary installation utility crate.<\/li>\n<\/ul>\n\n<h2 id=\"requests-for-contribution\">Requests for Contribution<\/h2>\n\n<p><strong>Want to get involved in Rust and WebAssembly? <a href=\"https:\/\/github.com\/rustwasm\/team\/blob\/master\/README.md#get-involved\">Join the Rust and WebAssembly\nworking group!<\/a><\/strong><\/p>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/issues?q=is%3Aopen+is%3Aissue+user%3Arustwasm+archived%3Afalse+label%3A%22good+first+issue%22\">All issues labeled \u201cgood first issue\u201d in the <code class=\"highlighter-rouge\">rustwasm\/*<\/code> repositories<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/issues?q=is%3Aopen+is%3Aissue+user%3Arustwasm+archived%3Afalse+label%3A%22help+wanted%22\">All issues labeled \u201chelp wanted\u201d in the <code class=\"highlighter-rouge\">rustwasm\/*<\/code> repositories<\/a><\/li>\n<\/ul>","author":{"name":{}},"summary":"Hello and welcome to another issue of This Week in Rust and WebAssembly!"},{"title":"This Week in Rust and WebAssembly 12","link":{"@attributes":{"href":"https:\/\/rustwasm.github.io\/2019\/02\/28\/this-week-in-rust-and-wasm-012.html","rel":"alternate","type":"text\/html","title":"This Week in Rust and WebAssembly 12"}},"published":"2019-02-28T00:00:00+00:00","updated":"2019-02-28T00:00:00+00:00","id":"https:\/\/rustwasm.github.io\/2019\/02\/28\/this-week-in-rust-and-wasm-012","content":"<p>Hello and welcome to another issue of <em>This Week in Rust and WebAssembly<\/em>!<\/p>\n\n<p><a href=\"https:\/\/rust-lang.org\">Rust<\/a> is a systems language pursuing the trifecta:\nsafety, concurrency, and speed.<\/p>\n\n<p><a href=\"http:\/\/webassembly.org\">WebAssembly<\/a> is a stack-based virtual machine and\ninstruction set. It is fast, safe, portable, and part of the open Web\nplatform. By compiling to WebAssembly, we can run Rust code on the Web!<\/p>\n\n<p>This is a weekly summary of Rust and WebAssembly\u2019s progress and community.<\/p>\n\n<p>Did we miss something? Tweet to us at <a href=\"https:\/\/twitter.com\/rustwasm\">@rustwasm<\/a>\nor <a href=\"https:\/\/github.com\/rustwasm\/rustwasm.github.io\">send us a pull request<\/a>.<\/p>\n\n<p><strong>Want to get involved in Rust and WebAssembly? <a href=\"https:\/\/github.com\/rustwasm\/team\/blob\/master\/README.md#get-involved\">Join the Rust and WebAssembly working group!<\/a><\/strong><\/p>\n\n<!-- TODO: check recent r\/rust and users.rust-lang.org posts for \"wasm\" and \"webassembly\": -->\n<!-- https:\/\/twitter.com\/rustwasm -->\n\n<h2 id=\"news-and-blog-posts-from-around-the-web\">News and Blog Posts from Around the Web<\/h2>\n\n<p><em>Want to make sure something ends up on this list next time we publish an issue?\n<a href=\"https:\/\/github.com\/rustwasm\/team\/issues\/79\">Leave a comment on this issue.<\/a><\/em><\/p>\n\n<ul>\n  <li><a href=\"https:\/\/developers.google.com\/web\/updates\/2019\/02\/hotpath-with-wasm\">Replacing a hot path in your app\u2019s JavaScript with\nWebAssembly.<\/a>\nThe article compares versions written in Rust, C\/C++, and AssemblyScript.<\/li>\n  <li><a href=\"https:\/\/github.com\/jedisct1\/was-not-wasm\">Was (not Wasm)<\/a> is a hostile\nallocator for AssemblyScript that is written in Rust.<\/li>\n  <li>Wasmer has <a href=\"https:\/\/medium.com\/wasmer\/running-webassembly-100x-faster-%EF%B8%8F-a8237e9a372d\">improved their startup time by\n100x<\/a>.<\/li>\n  <li><a href=\"http:\/\/troubles.md\/posts\/microwasm\/\">WebAssembly Troubles part 4: Microwasm.<\/a>\nThe culmination of a series of posts about issues the author has with\nWebAssembly, along with proposals for how to fix them.<\/li>\n  <li><a href=\"https:\/\/twitter.com\/HelloRenj\/status\/1100499645401366535\">Generating snow with Rust and\nWasm<\/a>\n    <ul>\n      <li><a href=\"https:\/\/zen-liskov-772f98.netlify.com\/\">Live demo<\/a><\/li>\n      <li><a href=\"https:\/\/github.com\/renjithgr\/wasm-make-some-snow\">Source<\/a><\/li>\n    <\/ul>\n  <\/li>\n<\/ul>\n\n<h2 id=\"updates-from-rustwasm\">Updates from <a href=\"https:\/\/github.com\/rustwasm\"><code class=\"highlighter-rouge\">rustwasm\/*<\/code><\/a><\/h2>\n\n<h3 id=\"rfcs\">RFCs<\/h3>\n\n<h4 id=\"new-rfcs\">New RFCs<\/h4>\n\n<p>None.<\/p>\n\n<h4 id=\"final-comment-period-rfcs\">Final Comment Period RFCs<\/h4>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/rfcs\/pull\/6\">Add support for local JavaScript snippets in\n<code class=\"highlighter-rouge\">wasm-bindgen<\/code><\/a><\/li>\n<\/ul>\n\n<h4 id=\"merged-rfcs\">Merged RFCs<\/h4>\n\n<p>None.<\/p>\n\n<h3 id=\"working-group-meetings\">Working Group Meetings<\/h3>\n\n<ul>\n  <li><a href=\"https:\/\/www.youtube.com\/watch?v=3YjN69U6ySE\">Watch the recording of this week\u2019s working group meeting on\nYouTube<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/team\/issues\/258\">Come join us at next week\u2019s working group\nmeeting!<\/a><\/li>\n<\/ul>\n\n<h3 id=\"rustwasmrust-parcel-template\"><code class=\"highlighter-rouge\">rustwasm\/rust-parcel-template<\/code><\/h3>\n\n<ul>\n  <li>@tock203 <a href=\"https:\/\/github.com\/rustwasm\/rust-parcel-template\/pull\/22\">fixed a\n<code class=\"highlighter-rouge\">ReferenceError<\/code><\/a> in\nthe template\u2019s initialization code.<\/li>\n<\/ul>\n\n<h3 id=\"rustwasmtwiggy\"><code class=\"highlighter-rouge\">rustwasm\/twiggy<\/code><\/h3>\n\n<ul>\n  <li>@data-pup <a href=\"https:\/\/github.com\/rustwasm\/twiggy\/pull\/253\">set up\n<code class=\"highlighter-rouge\">rustfmt<\/code>-checking<\/a> for our\ncontinuous integration.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/twiggy\/pull\/250\">made Twiggy account for header and section size\nbytes<\/a> of a Wasm binary, so\nTwiggy\u2019s output should sum to 100% now instead of just short of that.<\/li>\n  <li>@philipc <a href=\"https:\/\/github.com\/rustwasm\/twiggy\/pull\/247\">updated Twiggy to version 0.17.0 of\n<code class=\"highlighter-rouge\">gimli<\/code><\/a>, the crate it uses to\nparse DWARF debugging information.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/twiggy\/pull\/245\">switched Twiggy over to using the <code class=\"highlighter-rouge\">wasmparser<\/code>\ncrate<\/a> to parse Wasm binaries,\nwhich gives more precise byte offset and size information, and is faster than\nthe old Wasm parser.<\/li>\n  <li>@data-pup <a href=\"https:\/\/github.com\/rustwasm\/twiggy\/pull\/244\">added an unreachable items\nsummary<\/a> to the <code class=\"highlighter-rouge\">twiggy\ndominators<\/code> output, so that all top-level rows\u2019 sizes will sum to 100%.<\/li>\n<\/ul>\n\n<h3 id=\"rustwasmwasm-bindgen\"><code class=\"highlighter-rouge\">rustwasm\/wasm-bindgen<\/code><\/h3>\n\n<ul>\n  <li>@tyleranton added support for <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1302\">emitting doc\ncomments<\/a> in the\nTypeScript interface definition files that <code class=\"highlighter-rouge\">wasm-bindgen<\/code> creates.<\/li>\n  <li>@LegNeato <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1298\">fixed the <code class=\"highlighter-rouge\">wasm-bindgen-test<\/code> headless browser test\nrunner<\/a> on macOS High\nSierra.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1285\">updated the <code class=\"highlighter-rouge\">wasm-bindgen<\/code>\nguide<\/a> and added a\n\u201cDeployment\u201d section.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1279\">added support for the new <code class=\"highlighter-rouge\">TextEncoder.prototype.encodeInto<\/code>\nmethod<\/a> to\n<code class=\"highlighter-rouge\">wasm-bindgen<\/code>\u2019s generated JS glue when passing strings between wasm and JS.<\/li>\n<\/ul>\n\n<h3 id=\"rustwasmwasm-pack\"><code class=\"highlighter-rouge\">rustwasm\/wasm-pack<\/code><\/h3>\n\n<ul>\n  <li>@ashleygwilliams <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/556\">removed unnecessary\nentries<\/a> from the <code class=\"highlighter-rouge\">\"files\"<\/code>\nkey in <code class=\"highlighter-rouge\">wasm-pack<\/code>\u2019s generated <code class=\"highlighter-rouge\">package.json<\/code>.<\/li>\n  <li>@ashleygwilliams <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/550\">fixed the [wasm-pack] installer on\nwindows<\/a> when it is downloaded\nmultiple times and ends up with a <code class=\"highlighter-rouge\">(1)<\/code> suffix in its filename.<\/li>\n  <li>@surma <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/542\">wrote some docs on the <code class=\"highlighter-rouge\">wee_alloc<\/code>\nintegration<\/a> for the\n<code class=\"highlighter-rouge\">wasm-pack<\/code> template.<\/li>\n  <li>@DebugSteven <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/536\">wrote a series of get-started-in-X-environment\ntutorials<\/a> for <code class=\"highlighter-rouge\">wasm-pack<\/code>.<\/li>\n<\/ul>\n\n<h2 id=\"requests-for-contribution\">Requests for Contribution<\/h2>\n\n<p><strong>Want to get involved in Rust and WebAssembly? <a href=\"https:\/\/github.com\/rustwasm\/team\/blob\/master\/README.md#get-involved\">Join the Rust and WebAssembly\nworking group!<\/a><\/strong><\/p>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/issues?q=is%3Aopen+is%3Aissue+user%3Arustwasm+archived%3Afalse+label%3A%22good+first+issue%22\">All issues labeled \u201cgood first issue\u201d in the <code class=\"highlighter-rouge\">rustwasm\/*<\/code> repositories<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/issues?q=is%3Aopen+is%3Aissue+user%3Arustwasm+archived%3Afalse+label%3A%22help+wanted%22\">All issues labeled \u201chelp wanted\u201d in the <code class=\"highlighter-rouge\">rustwasm\/*<\/code> repositories<\/a><\/li>\n<\/ul>\n\n<h3 id=\"new-good-first-issues\">New Good First Issues<\/h3>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/issues\/1284\"><code class=\"highlighter-rouge\">wasm-bindgen<\/code>: Add <code class=\"highlighter-rouge\">#[wasm_bindgen(ignore)]<\/code> to ignore a <code class=\"highlighter-rouge\">pub<\/code> field and not\ngenerate getters\/setters for\nit<\/a><\/li>\n<\/ul>","author":{"name":{}},"summary":"Hello and welcome to another issue of This Week in Rust and WebAssembly!"},{"title":"This Week in Rust and WebAssembly 11","link":{"@attributes":{"href":"https:\/\/rustwasm.github.io\/2019\/02\/21\/this-week-in-rust-and-wasm-011.html","rel":"alternate","type":"text\/html","title":"This Week in Rust and WebAssembly 11"}},"published":"2019-02-21T00:00:00+00:00","updated":"2019-02-21T00:00:00+00:00","id":"https:\/\/rustwasm.github.io\/2019\/02\/21\/this-week-in-rust-and-wasm-011","content":"<p>Hello and welcome to another issue of <em>This Week in Rust and WebAssembly<\/em>!<\/p>\n\n<p><a href=\"https:\/\/rust-lang.org\">Rust<\/a> is a systems language pursuing the trifecta:\nsafety, concurrency, and speed.<\/p>\n\n<p><a href=\"http:\/\/webassembly.org\">WebAssembly<\/a> is a stack-based virtual machine and\ninstruction set. It is fast, safe, portable, and part of the open Web\nplatform. By compiling to WebAssembly, we can run Rust code on the Web!<\/p>\n\n<p>This is a weekly summary of Rust and WebAssembly\u2019s progress and community.<\/p>\n\n<p>Did we miss something? Tweet to us at <a href=\"https:\/\/twitter.com\/rustwasm\">@rustwasm<\/a>\nor <a href=\"https:\/\/github.com\/rustwasm\/rustwasm.github.io\">send us a pull request<\/a>.<\/p>\n\n<p><strong>Want to get involved in Rust and WebAssembly? <a href=\"https:\/\/github.com\/rustwasm\/team\/blob\/master\/README.md#get-involved\">Join the Rust and WebAssembly working group!<\/a><\/strong><\/p>\n\n<!-- TODO: check recent r\/rust and users.rust-lang.org posts for \"wasm\" and \"webassembly\": -->\n\n<h2 id=\"news-and-blog-posts-from-around-the-web\">News and Blog Posts from Around the Web<\/h2>\n\n<p><em>Want to make sure something ends up on this list next time we publish an issue?\n<a href=\"https:\/\/github.com\/rustwasm\/team\/issues\/79\">Leave a comment on this issue.<\/a><\/em><\/p>\n\n<ul>\n  <li><a href=\"https:\/\/twitter.com\/chinedufn\/status\/1098418821591957504\">Parsing and rendering PSD files in the browser with Rust and\nWebAssembly<\/a><\/li>\n  <li><a href=\"https:\/\/twitter.com\/fitzgen\/status\/1097941877884473344\">Programmatically generating Islamic\nstars<\/a> using the\n\u201cPolygons in Contact\u201d method with Rust-generated Wasm and Web GL\n    <ul>\n      <li><a href=\"https:\/\/johanneshoff.com\/geotoy\/\">Live demo<\/a><\/li>\n      <li><a href=\"https:\/\/github.com\/fitzgen\/geotoy\">Source<\/a><\/li>\n    <\/ul>\n  <\/li>\n  <li><a href=\"https:\/\/twitter.com\/AsgerNyman\/status\/1096389338211016705\">Dust is a renderer written in Rust that has a backend for Wasm and Web\nGL<\/a>\n    <ul>\n      <li><a href=\"https:\/\/asny.github.io\/spider-web\/index.html\">Live demo<\/a><\/li>\n      <li><a href=\"https:\/\/github.com\/asny\/Dust\">Source<\/a><\/li>\n    <\/ul>\n  <\/li>\n<\/ul>\n\n<h2 id=\"updates-from-rustwasm\">Updates from <a href=\"https:\/\/github.com\/rustwasm\"><code class=\"highlighter-rouge\">rustwasm\/*<\/code><\/a><\/h2>\n\n<h3 id=\"rfcs\">RFCs<\/h3>\n\n<h4 id=\"new-rfcs\">New RFCs<\/h4>\n\n<p>None.<\/p>\n\n<h4 id=\"merged-rfcs\">Merged RFCs<\/h4>\n\n<p>None.<\/p>\n\n<h3 id=\"console_error_panic_hook\"><code class=\"highlighter-rouge\">console_error_panic_hook<\/code><\/h3>\n\n<ul>\n  <li>@fitzgen <a href=\"https:\/\/github.com\/rustwasm\/console_error_panic_hook\/pull\/10\">added error\nstacks<\/a> to the\nmessage we log when a panic occurs. This works around bugs in both Safari\u2019s\nand Firefox\u2019s developer tools consoles.<\/li>\n<\/ul>\n\n<h3 id=\"js-sys\"><code class=\"highlighter-rouge\">js-sys<\/code><\/h3>\n\n<ul>\n  <li>@Pauan <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1225\">added convenience getters to\n<code class=\"highlighter-rouge\">js_sys::Reflect<\/code><\/a> for\ngetting properties keyed by <code class=\"highlighter-rouge\">u32<\/code> and <code class=\"highlighter-rouge\">f64<\/code>.<\/li>\n<\/ul>\n\n<h3 id=\"twiggy\">Twiggy\ud83c\udf31<\/h3>\n\n<ul>\n  <li>@data-pup <a href=\"https:\/\/github.com\/rustwasm\/twiggy\/pull\/243\">fixed some unused-result\nwarnings<\/a> in Twiggy\u2019s parser.<\/li>\n<\/ul>\n\n<h3 id=\"walrus\"><code class=\"highlighter-rouge\">walrus<\/code><\/h3>\n\n<ul>\n  <li>@alexcrichton made <a href=\"https:\/\/github.com\/rustwasm\/walrus\/pull\/60\">GC\u2019ing unused functions, globals, etc an explicit\npass<\/a> in <code class=\"highlighter-rouge\">walrus<\/code>. It was\npreviously performed implicitly as part of serializing a wasm module.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/walrus\/pull\/50\">implemented support for the reference types\nproposal<\/a> and <code class=\"highlighter-rouge\">anyref<\/code> in\n<code class=\"highlighter-rouge\">walrus<\/code>.<\/li>\n  <li>@fitzgen <a href=\"https:\/\/github.com\/rustwasm\/walrus\/pull\/58\">added the ability to explicitly\ndelete<\/a> various wasm constructs\n(functions, tables, etc) from a wasm module, rather than just implicitly\ndelete them by making them unused and then running a GC.<\/li>\n<\/ul>\n\n<h3 id=\"wasm-bindgen\"><code class=\"highlighter-rouge\">wasm-bindgen<\/code><\/h3>\n\n<ul>\n  <li>@alexcrichton added support for <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1275\"><code class=\"highlighter-rouge\">Option&lt;MyRustStruct&gt;<\/code> in parameters and\nreturn positions<\/a>.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1002\">added experimental support for using\n<code class=\"highlighter-rouge\">anyref<\/code><\/a> in\n<code class=\"highlighter-rouge\">wasm-bindgen<\/code>.<\/li>\n  <li>@fitzgen <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1255\">fixed a\nregression<\/a> where DWARF\ndebug info custom sections were always being included in the generated Wasm,\neven when debug info was not enabled.<\/li>\n  <li>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1256\">added a\nflag<\/a> to control whether\nthe producers custom section is included in the generated wasm binary or not.<\/li>\n  <li>@ctjhoa <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1259\">fixed some deprecation\nwarnings<\/a> around the use\nof <code class=\"highlighter-rouge\">ATOMICS_*_INIT<\/code> instead of <code class=\"highlighter-rouge\">Atomic*::new<\/code>.<\/li>\n<\/ul>\n\n<h3 id=\"wasm-snip\"><code class=\"highlighter-rouge\">wasm-snip<\/code><\/h3>\n\n<ul>\n  <li>@fitzgen ported <code class=\"highlighter-rouge\">wasm-snip<\/code> over to <a href=\"https:\/\/github.com\/rustwasm\/wasm-snip\/pull\/21\">using the <code class=\"highlighter-rouge\">walrus<\/code>\ncrate<\/a>. This also removes the\nneed to <code class=\"highlighter-rouge\">wasm-gc<\/code> again after running <code class=\"highlighter-rouge\">wasm-snip<\/code>.<\/li>\n<\/ul>\n\n<h3 id=\"web-sys\"><code class=\"highlighter-rouge\">web-sys<\/code><\/h3>\n\n<ul>\n  <li>@selaux <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1248\">added a missing Web IDL\nattribute<\/a> to\n<code class=\"highlighter-rouge\">HTMLMediaElement<\/code> so that <code class=\"highlighter-rouge\">web-sys<\/code> correctly generates bindings to the\n<code class=\"highlighter-rouge\">srcObject<\/code> property.<\/li>\n<\/ul>\n\n<h3 id=\"wee_alloc\"><code class=\"highlighter-rouge\">wee_alloc<\/code><\/h3>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/wee_alloc\/blob\/master\/CHANGELOG.md#043\"><strong>We released <code class=\"highlighter-rouge\">wee_alloc<\/code> version 0.4.3!\n\ud83c\udf89<\/strong><\/a>\nAmong other things, this version will work on stable Rust as soon as 1.33 is\nreleased, which is scheduled for one week from today: 2019-02-28.<\/li>\n<\/ul>\n\n<h2 id=\"requests-for-contribution\">Requests for Contribution<\/h2>\n\n<p><strong>Want to get involved in Rust and WebAssembly? <a href=\"https:\/\/github.com\/rustwasm\/team\/blob\/master\/README.md#get-involved\">Join the Rust and WebAssembly\nworking group!<\/a><\/strong><\/p>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/issues?q=is%3Aopen+is%3Aissue+user%3Arustwasm+archived%3Afalse+label%3A%22good+first+issue%22\">All issues labeled \u201cgood first issue\u201d in the <code class=\"highlighter-rouge\">rustwasm\/*<\/code> repositories<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/issues?q=is%3Aopen+is%3Aissue+user%3Arustwasm+archived%3Afalse+label%3A%22help+wanted%22\">All issues labeled \u201chelp wanted\u201d in the <code class=\"highlighter-rouge\">rustwasm\/*<\/code> repositories<\/a><\/li>\n<\/ul>\n\n<h3 id=\"new-good-first-issues\">New Good First Issues<\/h3>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/issues\/1270\"><code class=\"highlighter-rouge\">wasm-bindgen<\/code>: Handling <code class=\"highlighter-rouge\">undefined<\/code> arguments<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/issues\/1276\"><code class=\"highlighter-rouge\">wasm-bindgen<\/code>: Add doc comments from Rust to generated TypeScript\ndefinitions<\/a><\/li>\n<\/ul>","author":{"name":{}},"summary":"Hello and welcome to another issue of This Week in Rust and WebAssembly!"},{"title":"This Week in Rust and WebAssembly 10","link":{"@attributes":{"href":"https:\/\/rustwasm.github.io\/2019\/02\/13\/this-week-in-rust-and-wasm-010.html","rel":"alternate","type":"text\/html","title":"This Week in Rust and WebAssembly 10"}},"published":"2019-02-13T00:00:00+00:00","updated":"2019-02-13T00:00:00+00:00","id":"https:\/\/rustwasm.github.io\/2019\/02\/13\/this-week-in-rust-and-wasm-010","content":"<p>Hello and welcome to another issue of <em>This Week in Rust and WebAssembly<\/em>!<\/p>\n\n<p><a href=\"https:\/\/rust-lang.org\">Rust<\/a> is a systems language pursuing the trifecta:\nsafety, concurrency, and speed.<\/p>\n\n<p><a href=\"http:\/\/webassembly.org\">WebAssembly<\/a> is a stack-based virtual machine and\ninstruction set. It is fast, safe, portable, and part of the open Web\nplatform. By compiling to WebAssembly, we can run Rust code on the Web!<\/p>\n\n<p>This is a weekly summary of Rust and WebAssembly\u2019s progress and community.<\/p>\n\n<p>Did we miss something? Tweet to us at <a href=\"https:\/\/twitter.com\/rustwasm\">@rustwasm<\/a>\nor <a href=\"https:\/\/github.com\/rustwasm\/rustwasm.github.io\">send us a pull request<\/a>.<\/p>\n\n<h2 id=\"news-and-blog-posts-from-around-the-web\">News and Blog Posts from Around the Web<\/h2>\n\n<p><em>Want to make sure something ends up on this list next time we publish an issue?\n<a href=\"https:\/\/github.com\/rustwasm\/team\/issues\/79\">Leave a comment on this issue.<\/a><\/em><\/p>\n\n<ul>\n  <li>\n    <p><a href=\"https:\/\/rustwasm.github.io\/2018\/12\/06\/reflecting-on-rust-and-wasm-in-2018.html\"><strong>Reflecting on Rust and WebAssembly in\n2018<\/strong><\/a><\/p>\n  <\/li>\n  <li>\n    <p><a href=\"http:\/\/fitzgeraldnick.com\/2018\/12\/02\/wasm-bindgen-how-does-it-work.html\"><code class=\"highlighter-rouge\">wasm-bindgen<\/code> \u2014 how does it\nwork?!<\/a><\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/www.fastly.com\/blog\/edge-programming-rust-web-assembly\">Edge programming with Rust and WebAssembly with\nTerrarium<\/a><\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/medium.com\/wasmer\/executing-webassembly-in-your-rust-application-d5cd32e8ce46\">Embedding WebAssembly in your Rust Application with\nwasmer.io<\/a><\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/github.com\/iamcodemaker\/console_log\">The <code class=\"highlighter-rouge\">console_log<\/code> crate<\/a> is a\nbackend for <a href=\"https:\/\/crates.io\/crates\/log\">the <code class=\"highlighter-rouge\">log<\/code> facade<\/a> that pipes logged\nmessages to the browser\u2019s console.<\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/ozkriff.itch.io\/zemeroth\">Zemeroth<\/a> is a turn-based hexagonal\ntactical game written in Rust and WebAssembly.<\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/github.com\/richardanaya\/virtual-dom-rs-counter\">An example implementation of react\/redux style UI development in Rust with\n<code class=\"highlighter-rouge\">percy<\/code><\/a><\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/github.com\/David-OConnor\/seed\">Seed<\/a> is a new Wasm framework for Web\napps.<\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/github.com\/sendilkumarn\/generator-wasm-app\"><code class=\"highlighter-rouge\">sendilkumarn\/generator-wasm-app<\/code><\/a>\nis a a Wasm app generator for <a href=\"https:\/\/yeoman.io\/\">Yeoman<\/a>.<\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/github.com\/edvorg\/rustmith\"><code class=\"highlighter-rouge\">edvorg\/rustsmith<\/code><\/a> is a Rocksmith clone\nfor the Web platform built with Rust and WebAssembly.<\/p>\n  <\/li>\n<\/ul>\n\n<h3 id=\"rustwasm2019-posts\"><code class=\"highlighter-rouge\">#RustWasm2019<\/code> Posts<\/h3>\n\n<ul>\n  <li>\n    <p><a href=\"https:\/\/blog.ryanlevick.com\/posts\/rust-wasm-2019\/\">Rust WebAssembly 2019<\/a> by\nRyan Levick<\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/www.reddit.com\/r\/rust\/comments\/aac8zk\/my_rust_2019_dream_dominate_the_web\/\">My Rust 2019 Dream: Dominate the\nWeb<\/a>\nby richardanaya<\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/blog.yoshuawuyts.com\/wasm-2019\/\">Wasm 2019<\/a> by Yoshua Wuyts<\/p>\n  <\/li>\n  <li>\n    <p><a href=\"http:\/\/fitzgeraldnick.com\/2018\/12\/14\/rust-and-webassembly-in-2019.html\">Rust and WebAssembly in\n2019<\/a>\nby Nick Fitzgerald<\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/medium.com\/wasmer\/non-web-embeddings-for-rust-wasm-2019-7b290e94f81d\">Non-Web Embeddings for Rust Wasm\n2019<\/a>\nby Brandon Fish and wasmer.io<\/p>\n  <\/li>\n<\/ul>\n\n<h2 id=\"wasm-at-the-2019-rust-all-hands\">Wasm at the 2019 Rust All Hands<\/h2>\n\n<p>The 2019 Rust All Hands meetup was in Berlin on February 4<sup>th<\/sup> through\n8<sup>th<\/sup>. @ag_dubs, @alexcrichton, @fitzgen, and @yoshuawuyts from the\nRust and WebAssembly working group all made it out to discuss some Wasm-related\ntopics and plan for 2019.<\/p>\n\n<p>We talked about:<\/p>\n\n<ul>\n  <li>\n    <p><a href=\"https:\/\/gist.github.com\/fitzgen\/23a62ebbd67574b9f6f72e5ac8eaeb67#file-road-to-wasm-pack-1-0-md\">The road to <code class=\"highlighter-rouge\">wasm-pack<\/code>\n1.0.<\/a>\nThis meeting was about trying to pin down what we want to ship as part of a\n<code class=\"highlighter-rouge\">wasm-pack<\/code> 1.0 release, as well as crystallize <code class=\"highlighter-rouge\">wasm-pack<\/code>\u2019s ideal UX.<\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/gist.github.com\/fitzgen\/23a62ebbd67574b9f6f72e5ac8eaeb67#file-modular-toolkit-md\">A modular toolkit for\nWasm.<\/a>\nThere\u2019s been a lot of talk in <code class=\"highlighter-rouge\">#RustWasm2019<\/code> posts and the 2019 roadmap RFC\nabout building a modular toolkit for Wasm apps and libraries. This meeting was\ntrying to dig a bit more into the details of what that entails. And naming, of\ncourse.<\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/gist.github.com\/fitzgen\/23a62ebbd67574b9f6f72e5ac8eaeb67#file-cargo-build-hooks-for-wasm-md\"><code class=\"highlighter-rouge\">cargo<\/code> build tasks, hooks, and\/or <code class=\"highlighter-rouge\">post-build.rs<\/code> for\nWasm.<\/a>\nLong-term (likely on the timeline of a couple years) we would like the\nexperience of building Rust and Wasm projects to be <em>exactly<\/em> the same as\nbuilding normal Rust projects: just <code class=\"highlighter-rouge\">cargo build<\/code> and that\u2019s it. But there is\na bunch of stuff that needs to happen for Wasm after <code class=\"highlighter-rouge\">rustc<\/code> emits a Wasm\nbinary, such as generate JS bindings or run <code class=\"highlighter-rouge\">wasm-opt<\/code>. This meeting was about\nhow to add some sort of generic build hooks to <code class=\"highlighter-rouge\">cargo<\/code> and turn <code class=\"highlighter-rouge\">wasm-pack<\/code>\ninto an implementation of those generic hooks specifically targeted for Wasm\ndevelopment.<\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/gist.github.com\/fitzgen\/23a62ebbd67574b9f6f72e5ac8eaeb67#file-wasm-multithreading-and-rayon-md\">Multithreading Wasm and\n<code class=\"highlighter-rouge\">rayon<\/code>.<\/a>\nThis meeting was about how we take our experimental Wasm multithreading\nsupport and turn it into a reliable library that can serve as the foundation\nfor multithreading on the Web. @CUViper from the <code class=\"highlighter-rouge\">rayon<\/code> team also joined, and\nwe made a plan for how to get <code class=\"highlighter-rouge\">rayon<\/code> working in Wasm.<\/p>\n  <\/li>\n<\/ul>\n\n<h2 id=\"updates-from-rustwasm\">Updates from <a href=\"https:\/\/github.com\/rustwasm\"><code class=\"highlighter-rouge\">rustwasm\/*<\/code><\/a><\/h2>\n\n<h3 id=\"rfcs\">RFCs<\/h3>\n\n<h4 id=\"new-rfcs\">New RFCs<\/h4>\n\n<ul>\n  <li>\n    <p><a href=\"https:\/\/github.com\/rustwasm\/rfcs\/pull\/7\"><strong>2019 Roadmap<\/strong><\/a> \u2014 this is\nyour chance to help shape our goals for the year!<\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/github.com\/rustwasm\/rfcs\/pull\/6\">Add support for local JS snippets in <code class=\"highlighter-rouge\">wasm-bindgen<\/code><\/a><\/p>\n  <\/li>\n<\/ul>\n\n<h4 id=\"merged-rfcs\">Merged RFCs<\/h4>\n\n<p>None.<\/p>\n\n<h3 id=\"book\">Book<\/h3>\n\n<ul>\n  <li>@DebugSteven <a href=\"https:\/\/github.com\/rustwasm\/book\/pull\/137\">wrote a testing\nsection<\/a> for the Game of Life\ntutorial!<\/li>\n<\/ul>\n\n<h3 id=\"twiggy\">Twiggy\ud83c\udf31<\/h3>\n\n<ul>\n  <li>\n    <p><a href=\"https:\/\/github.com\/rustwasm\/twiggy\/blob\/master\/CHANGELOG.md#040\"><strong>We released Twiggy\ud83c\udf31 0.4.0!\n\ud83c\udf89<\/strong><\/a><\/p>\n  <\/li>\n  <li>\n    <p>@brson fixed a bug where we would <a href=\"https:\/\/github.com\/rustwasm\/twiggy\/pull\/232\">attempt to demangle things that were not\nC++<\/a> symbols as if they were C++\nsymbols.<\/p>\n  <\/li>\n<\/ul>\n\n<h3 id=\"walrus\"><code class=\"highlighter-rouge\">walrus<\/code><\/h3>\n\n<ul>\n  <li>\n    <p><a href=\"https:\/\/github.com\/rustwasm\/walrus\"><code class=\"highlighter-rouge\">walrus<\/code> is a new library crate for writing Wasm-to-Wasm\ntransformations.<\/a> It will eventually (but\ndoesn\u2019t yet) preserve DWARF debug info for the Wasm across your\ntransformations.<\/p>\n  <\/li>\n  <li>\n    <p>@alexcrichton got <code class=\"highlighter-rouge\">walrus<\/code> <a href=\"https:\/\/github.com\/rustwasm\/walrus\/pull\/24\">round-tripping all the Wasm spec\ntests<\/a> correctly.<\/p>\n  <\/li>\n  <li>\n    <p>@fitzgen <a href=\"https:\/\/github.com\/rustwasm\/walrus\/pull\/45\">wrote a simple Wasm\nfuzzer<\/a>, immediately found a bug,\nand whipped up a fix.<\/p>\n  <\/li>\n  <li>\n    <p>@alexcrichton refactored instruction parsing to <a href=\"https:\/\/github.com\/rustwasm\/walrus\/pull\/48\">avoid\nrecursion<\/a>. This means that we\ndon\u2019t blow the stack in debug builds or when given malicious input.<\/p>\n  <\/li>\n  <li>\n    <p>We just released <code class=\"highlighter-rouge\">walrus<\/code> 0.1.0 on crates.io \u2014 expect more exciting\nthings from <code class=\"highlighter-rouge\">walrus<\/code> in the future :)<\/p>\n  <\/li>\n<\/ul>\n\n<h3 id=\"wasm-bindgen\"><code class=\"highlighter-rouge\">wasm-bindgen<\/code><\/h3>\n\n<ul>\n  <li>\n    <p><a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/blob\/master\/CHANGELOG.md#0236\"><strong>We released <code class=\"highlighter-rouge\">wasm-bindgen<\/code> 0.2.29 through 0.2.36!\n\ud83c\udf89<\/strong><\/a><\/p>\n  <\/li>\n  <li>\n    <p>@derekdreery <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1161\">improved the <code class=\"highlighter-rouge\">std::fmt::Debug<\/code> output for\n<code class=\"highlighter-rouge\">JsValue<\/code><\/a> so that it\nincludes object properties and their values, instead of just <code class=\"highlighter-rouge\">[object\nObject]<\/code>.<\/p>\n  <\/li>\n  <li>\n    <p>@fitzgen made the <code class=\"highlighter-rouge\">wasm-bindgen-test<\/code> testing infrastructure <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1184\">capture more\n<code class=\"highlighter-rouge\">console<\/code> logging methods\u2019 (<code class=\"highlighter-rouge\">warn<\/code>, <code class=\"highlighter-rouge\">info<\/code>, etc)\noutput<\/a> for displaying in\n<code class=\"highlighter-rouge\">stdout<\/code>.<\/p>\n  <\/li>\n  <li>\n    <p>@T5uku5hi <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1207\">added <code class=\"highlighter-rouge\">#[allow(clippy::all)]<\/code> to <code class=\"highlighter-rouge\">wasm-bindgen<\/code>\u2019s macro-generated\ncode,<\/a> so that running\nclippy on crates that use <code class=\"highlighter-rouge\">wasm-bindgen<\/code> isn\u2019t so noisy.<\/p>\n  <\/li>\n  <li>\n    <p>@alexcrichton added support for <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1214\">passing <code class=\"highlighter-rouge\">Option&lt;MyEnum&gt;<\/code> back and\nforth<\/a> between Wasm and JS\nif <code class=\"highlighter-rouge\">MyEnum<\/code> has the <code class=\"highlighter-rouge\">#[wasm_bindgen]<\/code> attribute.<\/p>\n  <\/li>\n  <li>\n    <p>@fitzgen <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1219\">added the <code class=\"highlighter-rouge\">UnwrapThrowExt<\/code>\ntrait<\/a> to <code class=\"highlighter-rouge\">wasm-bindgen<\/code>\u2019s\nprelude. This extension trait adds <code class=\"highlighter-rouge\">unwrap_throw<\/code> and <code class=\"highlighter-rouge\">expect_throw<\/code> methods\nto <code class=\"highlighter-rouge\">Option&lt;T&gt;<\/code> and <code class=\"highlighter-rouge\">Result&lt;T, E&gt;<\/code> that have the same behavior as regular\n<code class=\"highlighter-rouge\">unwrap<\/code> and <code class=\"highlighter-rouge\">expect<\/code> except they throw a JS error on failure instead of\npanicking. This is morally the same, but ends up avoiding the <code class=\"highlighter-rouge\">std::panicking<\/code>\nand <code class=\"highlighter-rouge\">std::fmt<\/code> infrastructure, resulting in smaller code sizes.<\/p>\n  <\/li>\n  <li>\n    <p>@alexcrichton <a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1237\">migrated <code class=\"highlighter-rouge\">wasm-bindgen<\/code>\u2019s post-<code class=\"highlighter-rouge\">rustc<\/code> Wasm\ntransformations<\/a> to the\nnew <code class=\"highlighter-rouge\">walrus<\/code> crate! This paves the way for maintaining DWARF debug info\nthrough <code class=\"highlighter-rouge\">wasm-bindgen<\/code>.<\/p>\n  <\/li>\n  <li>\n    <p>@fitzgen made the <code class=\"highlighter-rouge\">wasm-bindgen-test<\/code> runtime capture logged messages in tests\n<a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/pull\/1233\">via <code class=\"highlighter-rouge\">textContent<\/code> instead of\n<code class=\"highlighter-rouge\">innerHTML<\/code><\/a>, avoiding\nissues when logging HTML strings ;)<\/p>\n  <\/li>\n<\/ul>\n\n<h3 id=\"wasm-pack\"><code class=\"highlighter-rouge\">wasm-pack<\/code><\/h3>\n\n<ul>\n  <li>\n    <p><a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/blob\/master\/CHANGELOG.md#-060\"><strong>We released <code class=\"highlighter-rouge\">wasm-pack<\/code>\n0.6.0! \ud83c\udf89<\/strong><\/a><\/p>\n  <\/li>\n  <li>\n    <p>@drager implemented <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/446\">support for typo\ndetection<\/a> in <code class=\"highlighter-rouge\">wasm-pack<\/code>\u2019s\n<code class=\"highlighter-rouge\">Cargo.toml<\/code> section.<\/p>\n  <\/li>\n  <li>\n    <p>@torkve added support for <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/461\">passing arbitrary extra CLI arguments through\n<code class=\"highlighter-rouge\">wasm-pack build<\/code><\/a> and into\n<code class=\"highlighter-rouge\">cargo build<\/code>. For example, to build with all cargo features enabled:\n<code class=\"highlighter-rouge\">wasm-pack build -- --all-features<\/code>.<\/p>\n  <\/li>\n  <li>\n    <p>This inspired @chinedufn to add support for <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/530\">passing arbitrary extra CLI arguments\nthrough <code class=\"highlighter-rouge\">wasm-pack test<\/code><\/a> and\ninto <code class=\"highlighter-rouge\">cargo test<\/code>!<\/p>\n  <\/li>\n  <li>\n    <p>@fitzgen fixed a bug where <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/521\">the output of <code class=\"highlighter-rouge\">wasm-pack test<\/code> was printed\ntwice<\/a>.<\/p>\n  <\/li>\n  <li>\n    <p>@rhysd added support for <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/531\">emitting the \u201chomepage\u201d\nfield<\/a> in our generated\n<code class=\"highlighter-rouge\">package.json<\/code> if it is present in the crate\u2019s <code class=\"highlighter-rouge\">Cargo.toml<\/code>.<\/p>\n  <\/li>\n  <li>\n    <p>@jscheffner <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/pull\/537\">fixed <code class=\"highlighter-rouge\">wasm-pack<\/code>\u2019s fetching of <code class=\"highlighter-rouge\">chromedriver<\/code>\nbinaries<\/a> for headless browser\ntesting on Windows.<\/p>\n  <\/li>\n<\/ul>\n\n<h2 id=\"requests-for-contribution\">Requests for Contribution<\/h2>\n\n<p><em>Want to get involved in Rust and WebAssembly? <a href=\"https:\/\/github.com\/rustwasm\/team\/blob\/master\/README.md#get-involved\">Join the Rust and WebAssembly\nworking group!<\/a><\/em><\/p>\n\n<ul>\n  <li>\n    <p><a href=\"https:\/\/github.com\/issues?q=is%3Aopen+is%3Aissue+user%3Arustwasm+archived%3Afalse+label%3A%22good+first+issue%22\">All issues labeled \u201cgood first issue\u201d in the <code class=\"highlighter-rouge\">rustwasm\/*<\/code> repositories<\/a><\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/github.com\/issues?q=is%3Aopen+is%3Aissue+user%3Arustwasm+archived%3Afalse+label%3A%22help+wanted%22\">All issues labeled \u201chelp wanted\u201d in the <code class=\"highlighter-rouge\">rustwasm\/*<\/code> repositories<\/a><\/p>\n  <\/li>\n<\/ul>\n\n<h3 id=\"new-help-wanted-issues\">New \u201cHelp Wanted\u201d Issues<\/h3>\n\n<ul>\n  <li>\n    <p><a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/issues\/533\"><code class=\"highlighter-rouge\">wasm-pack<\/code> \u2014 docs: add documentation for working with wasm-pack\noutside of template<\/a><\/p>\n  <\/li>\n  <li>\n    <p><a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/issues\/470\"><code class=\"highlighter-rouge\">wasm-pack<\/code> \u2014 installer: do not attempt to install to\n\/usr\/bin<\/a><\/p>\n  <\/li>\n<\/ul>","author":{"name":{}},"summary":"Hello and welcome to another issue of This Week in Rust and WebAssembly!"},{"title":"Reflecting on Rust and WebAssembly in 2018","link":{"@attributes":{"href":"https:\/\/rustwasm.github.io\/2018\/12\/06\/reflecting-on-rust-and-wasm-in-2018.html","rel":"alternate","type":"text\/html","title":"Reflecting on Rust and WebAssembly in 2018"}},"published":"2018-12-06T00:00:00+00:00","updated":"2018-12-06T00:00:00+00:00","id":"https:\/\/rustwasm.github.io\/2018\/12\/06\/reflecting-on-rust-and-wasm-in-2018","content":"<p><a href=\"https:\/\/blog.rust-lang.org\/2018\/12\/06\/Rust-1.31-and-rust-2018.html\"><strong>\ud83c\udf89 The 2018 edition of Rust has officially shipped, and the initial Rust and\nWebAssembly development story along with it! \ud83c\udf89<\/strong><\/a><\/p>\n\n<p>To see how far we\u2019ve come, let\u2019s reflect on the Rust and WebAssembly story a\nyear ago: <code class=\"highlighter-rouge\">rustc<\/code> could emit WebAssembly binaries for you, but that was about\nit. As far as communication with JavaScript went, you had to work with raw wasm\nimports and exports yourself. That meant you could only pass 32- and 64-bit\nintegers and floats back and forth. No Rust structs, JavaScript objects,\nstrings, or slices could be passed back forth. And distributing your library\u2019s\n<code class=\"highlighter-rouge\">.wasm<\/code> so that other downstream projects could depend on it? Good luck.<\/p>\n\n<p>While it was <a href=\"https:\/\/mgattozzi.com\/rust-wasm\/\">clear there was huge potential for Rust and\nWebAssembly<\/a>, no one was sure what exactly that\nmeant. So when the Rust and WebAssembly domain working group formed, we rallied\naround making this shared vision into a reality:<\/p>\n\n<blockquote>\n  <h4 id=\"compiling-rust-to-webassembly-should-be-the-best-choice-for-fast-reliable-code-for-the-web\">Compiling Rust to WebAssembly should be the best choice for fast, reliable code for the Web.<\/h4>\n<\/blockquote>\n\n<p>As our ideas evolved, we distilled another core value:<\/p>\n\n<blockquote>\n  <h4 id=\"rust-and-webassembly-is-here-to-augment-your-javascript-not-replace-it\">Rust and WebAssembly is here to <em>augment<\/em> your JavaScript, not replace it.<\/h4>\n<\/blockquote>\n\n<p>The same way that Rust integrates with C libraries and calling conventions on\nnative targets, it should play nice with JavaScript and HTML5 APIs on the\nWeb. You should <em>not<\/em> have to rewrite your whole Web application or JavaScript\nlibrary. We cannot realize our vision for Rust and wasm if it means you have to\nstart over from scratch; it wouldn\u2019t be practical.<\/p>\n\n<p>Given these shared values and vision, we set out goals for what we wanted the\nRust and WebAssembly ecosystem, toolchain, and workflow to look like by the time\nRust 2018 shipped.<\/p>\n\n<h3 id=\"goal--zero-cost-javascript-interoperation\">Goal: \u2611 Zero-Cost JavaScript Interoperation<\/h3>\n\n<p>Rust enables fast <em>and<\/em> expressive code by leveraging zero-cost abstractions. We\nwanted to apply this principle to our whole JS interop infrastructure. Yes, you\ncan write your own boilerplate to pass DOM nodes to Rust-generated wasm, but you\nshouldn\u2019t have to, and the provided infrastructure should be as fast as if you\n<em>did<\/em> hand-code it. If you call IndexedDB APIs, that shouldn\u2019t bloat your\n<code class=\"highlighter-rouge\">.wasm<\/code> binary with unused bindings to Web GL functions.<\/p>\n\n<p><a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\">We created <code class=\"highlighter-rouge\">wasm-bindgen<\/code> as the foundation for zero-cost JavaScript\ninteroperation.<\/a> <code class=\"highlighter-rouge\">wasm-bindgen<\/code> facillitates communication between\nJavaScript and WebAssembly, and generates glue code that you would otherwise\nhave to write yourself. On top of <code class=\"highlighter-rouge\">wasm-bindgen<\/code>, <a href=\"https:\/\/rustwasm.github.io\/2018\/09\/26\/announcing-web-sys.html\">we built <code class=\"highlighter-rouge\">js-sys<\/code> (raw\nbindings to ECMAScript APIs) and <code class=\"highlighter-rouge\">web-sys<\/code> (raw bindings to Web\nAPIs)<\/a>.<\/p>\n\n<p>Using the <code class=\"highlighter-rouge\">wasm-bindgen<\/code> ecosystem, we can easily and performantly<\/p>\n\n<ul>\n  <li>export rich APIs from our Rust-generated wasm libraries, so they are callable\nfrom JavaScript, and<\/li>\n  <li>import JavaScript and Web APIs into our Rust-generated wasm.<\/li>\n<\/ul>\n\n<p>All in a zero-cost manner.<\/p>\n\n<p>Additionally, <code class=\"highlighter-rouge\">wasm-bindgen<\/code> is forward-compatible with the <a href=\"https:\/\/github.com\/WebAssembly\/webidl-bindings\/blob\/master\/proposals\/webidl-bindings\/Explainer.md\">WebAssembly host\nbindings proposal<\/a>. Host bindings will remove the tiny, generated\nJavaScript shim functions that sit between our wasm functions and DOM\nmethods. Eventually, host bindings promises to unlock\neven-faster-than-JavaScript DOM access since calls can be statically validated\nonce rather than dynamically checked every time.<\/p>\n\n<h3 id=\"goal--distributing-rust-generated-wasm-as-an-npm-library\">Goal: \u2611 Distributing Rust-Generated Wasm as an NPM Library<\/h3>\n\n<p>Superb integration isn\u2019t only about exporting and importing functionality\nbetween Rust-generated WebAssembly and JavaScript. It is also fitting into the\nJavaScript\u2019s distribution mechanisms, and a big chunk of that story is\n<a href=\"https:\/\/www.npmjs.com\/\">NPM<\/a>.<\/p>\n\n<p>We <a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\">built <code class=\"highlighter-rouge\">wasm-pack<\/code><\/a> to make it easy to create and publish NPM\npackages from your Rust and WebAssembly code. There didn\u2019t used to be any story\nwhatsoever for sharing Rust-generated wasm modules. Now, all it takes is:<\/p>\n\n<div class=\"highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>wasm-pack publish\n<\/code><\/pre><\/div><\/div>\n\n<h3 id=\"goal--get-developers-productive-fast\">Goal: \u2611 Get Developers Productive Fast<\/h3>\n\n<p>We wrote <a href=\"https:\/\/rustwasm.github.io\/book\/\">a Rust and WebAssembly book<\/a> that teaches you all the ins and\nouts of WebAssembly development with Rust. It features <a href=\"https:\/\/rustwasm.github.io\/book\/game-of-life\/introduction.html\">a tutorial where you\nbuild an implementation of Conway\u2019s Game of Life<\/a>, and then you learn\nto write tests for headless browsers, debug wasm code when things go wrong, and\nhow to diagnose slow code paths and then speed them up.<\/p>\n\n<p>We realized that there are a bunch of \u201cpost-build\u201d tools you want to run after\n<code class=\"highlighter-rouge\">cargo<\/code> and <code class=\"highlighter-rouge\">rustc<\/code> emit the initial <code class=\"highlighter-rouge\">.wasm<\/code> binary. For usability and developer\nproductivity, we expanded <code class=\"highlighter-rouge\">wasm-pack<\/code>\u2019s role from creating and publishing NPM\npackages to orchestrating all of these tasks. <code class=\"highlighter-rouge\">wasm-pack<\/code> will manage your\n<code class=\"highlighter-rouge\">wasm-bindgen<\/code> CLI binaries and install browsers\u2019 WebDriver clients for you\nautomatically.<\/p>\n\n<p>For example, want to run tests in a headless Firefox browser? Just run<\/p>\n\n<div class=\"highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>wasm-pack test --headless --firefox\n<\/code><\/pre><\/div><\/div>\n\n<p>No need to pull your hair out trying to install and configure anything!<\/p>\n\n<p>Finally, we recognized that getting your Rust and WebAssembly project set up\ninitially involves a bit of boilerplate and configuration that new users aren\u2019t\nprepared for and experienced users don\u2019t want to waste time on. So we created a\nvariety of project templates for different use cases, so you can hit the ground\nrunning:<\/p>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/wasm-pack-template\"><code class=\"highlighter-rouge\">wasm-pack-template<\/code><\/a> for creating NPM libraries with\nRust and Wasm.<\/li>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/create-wasm-app\"><code class=\"highlighter-rouge\">create-wasm-app<\/code><\/a> for creating Web applications built on\ntop of Rust-generated wasm NPM libraries.<\/li>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/rust-webpack-template\"><code class=\"highlighter-rouge\">rust-webpack-template<\/code><\/a> for creating whole Web\napplications with Rust, WebAssembly, and the Webpack bundler.<\/li>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/rust-parcel-template\"><code class=\"highlighter-rouge\">rust-parcel-template<\/code><\/a> for creating whole Web\napplications with Rust, WebAssembly, and the Parcel bundler.<\/li>\n<\/ul>\n\n<h3 id=\"goal--rust-generated-wasm-should-be-testable-and-debuggable\">Goal: \u2611 Rust-Generated Wasm Should be Testable and Debuggable<\/h3>\n\n<p>We recognized that testing and debugging infrastructure are table stakes for\ncreating reliable code and developer productivity.<\/p>\n\n<p>By default, wasm can\u2019t log any panics or errors because it doesn\u2019t have any\n\u201csyscall\u201d or I\/O functionality. You have to add imports for that sort of thing\nyourself, and then instantiate the module with the appropriate functions. To\nremedy this problem, and to ensure that panics are always debuggable, we created\n<a href=\"https:\/\/github.com\/rustwasm\/console_error_panic_hook\">the <code class=\"highlighter-rouge\">console_error_panic_hook<\/code> crate<\/a>, which\nredirects panic messages into the browser\u2019s devtools console.<\/p>\n\n<p>While you can always run normal <code class=\"highlighter-rouge\">#[test]<\/code>s on the native target for portable,\nplatform-agnostic code, that isn\u2019t sufficient for testing your library\u2019s\ninteraction with the DOM, asynchronous JavaScript promises, or event\nhandlers. So we created <a href=\"https:\/\/rustwasm.github.io\/wasm-bindgen\/wasm-bindgen-test\/index.html\">the <code class=\"highlighter-rouge\">wasm-bindgen-test<\/code>\ninfrastructure<\/a>, and made installing and configuring the\nnecessary binaries for headless browser and Node.js testing a breeze with\n<code class=\"highlighter-rouge\">wasm-pack test<\/code>.<\/p>\n\n<p>We also had experienced that diagnosing where code size was coming from could be\nhard with WebAssembly. We wanted to know things like which function was calling\nanother function, and causing it to be included in the <code class=\"highlighter-rouge\">.wasm<\/code> binary, so we\ncreated <a href=\"https:\/\/github.com\/rustwasm\/twiggy\">the Twiggy\ud83c\udf31 code size profiler for WebAssembly<\/a>.<\/p>\n\n<div class=\"highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code> Shallow Bytes \u2502 Shallow % \u2502 Retaining Paths\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n           152 \u250a     5.40% \u250a wee_alloc::alloc_with_refill::hb32c1bbce9ebda8e\n               \u250a           \u250a   \u2b11 func[2]\n               \u250a           \u250a       \u2b11 &lt;wee_alloc::size_classes::SizeClassAllocPolicy&lt;'a&gt; as wee_alloc::AllocPolicy&gt;::new_cell_for_free_list::h3987e3054b8224e6\n               \u250a           \u250a           \u2b11 func[5]\n               \u250a           \u250a               \u2b11 elem[0]\n               \u250a           \u250a       \u2b11 hello\n               \u250a           \u250a           \u2b11 func[8]\n               \u250a           \u250a               \u2b11 export \"hello\"\n<\/code><\/pre><\/div><\/div>\n\n<h2 id=\"rustwasm2019\">#RustWasm2019<\/h2>\n\n<p>All of our goals have been focused on things we could deliver in tandem with the\n2018 edition. But now that the 2018 edition has shipped, it is time to think\nabout what we want to achieve in 2019 and beyond.<\/p>\n\n<p><strong>This is where you come in!<\/strong><\/p>\n\n<p>Following in the larger Rust project\u2019s <a href=\"https:\/\/blog.rust-lang.org\/2018\/12\/06\/call-for-rust-2019-roadmap-blogposts.html\">tradition<\/a>,\nwe\u2019re asking the community to write blog posts reflecting on Rust and\nWebAssembly in 2018 and proposing goals and directions for Rust and WebAssembly\nin 2019. We\u2019ll read everything, and then propose an <a href=\"https:\/\/github.com\/rustwasm\/rfcs\">RFC<\/a> for\nthe Rust and WebAssembly domain working group\u2019s roadmap in 2019.<\/p>\n\n<p>Write down your thoughts on whatever your writing platform of choice is. It\ncould be:<\/p>\n\n<ul>\n  <li>Your personal or company blog<\/li>\n  <li>A GitHub gist<\/li>\n  <li>A Medium post<\/li>\n  <li>Any other platform you prefer<\/li>\n<\/ul>\n\n<p>We\u2019re looking for posts on many different topics:<\/p>\n\n<ul>\n  <li>Ideas for community programs<\/li>\n  <li>Tooling enhancements<\/li>\n  <li>Ecosystem and library needs<\/li>\n  <li>Documentation improvements<\/li>\n  <li>Anything else related to Rust and Wasm!<\/li>\n<\/ul>\n\n<p>Tweet your write up with <a href=\"https:\/\/twitter.com\/search?q=%23RustWasm2019\">the <code class=\"highlighter-rouge\">#RustWasm2019<\/code> hashtag<\/a> or drop a link\non <a href=\"https:\/\/github.com\/rustwasm\/team\/issues\/241\">this github issue<\/a>. We\u2019ll aggregate everything\neveryone has written in another big post on this blog. Then, the core Rust and\nWebAssembly working group team will read over all of them and write up an RFC\nfor the working group\u2019s 2019 roadmap! This RFC will follow our normal <a href=\"https:\/\/rustwasm.github.io\/rfcs\/001-the-rfc-process.html\">RFC\nprocess<\/a> and everyone will have a chance to discuss it, improve it, and help\npolish it.<\/p>\n\n<h2 id=\"preliminary-timeline\">Preliminary Timeline<\/h2>\n\n<ul>\n  <li><strong>Now through January 15<sup>th<\/sup>:<\/strong> Share your <code class=\"highlighter-rouge\">#RustWasm2019<\/code> post, read\nposts by others, discuss them, bounce ideas back and forth.<\/li>\n  <li><strong>End of January:<\/strong> We\u2019ll formally propose the 2019 roadmap RFC, and then work\nit through the RFC process together as a community.<\/li>\n  <li><strong>End of February:<\/strong> We\u2019re aiming for having consensus on the 2019 roadmap and\nmerging the RFC before the end of February.<\/li>\n<\/ul>\n\n<h2 id=\"thank-you-for-a-wonderful-2018-\">Thank You for a Wonderful 2018! \ud83d\udc96<\/h2>\n\n<p>Thanks to everyone who contributed to Rust and WebAssembly in 2018! (Apologies\nif we missed anyone in this list!)<\/p>\n\n<ul>\n  <li>0xazure<\/li>\n  <li>Aaron Turon<\/li>\n  <li>Aditya Arora<\/li>\n  <li>Aidan Hobson Sayers<\/li>\n  <li>Aleksey Kladov<\/li>\n  <li>Alex Crichton<\/li>\n  <li>Alex Macleod<\/li>\n  <li>Alexander Kryvomaz<\/li>\n  <li>Alfie John<\/li>\n  <li>Anders Pitman<\/li>\n  <li>Andrew Champion<\/li>\n  <li>Andrew Chin<\/li>\n  <li>Andy Bell<\/li>\n  <li>Anna Bogus<\/li>\n  <li>Anton Danilkin<\/li>\n  <li>Ashley Williams<\/li>\n  <li>Ben Merritt<\/li>\n  <li>Benjamin Kampmann<\/li>\n  <li>Blixt<\/li>\n  <li>Bradlee Speice<\/li>\n  <li>Cameron Taggart<\/li>\n  <li>Camille TJHOA<\/li>\n  <li>Chinedu Francis Nwafili<\/li>\n  <li>Chris Goller<\/li>\n  <li>Chris Kolodin<\/li>\n  <li>Christian Bourjau<\/li>\n  <li>Christopher Lane Hinson<\/li>\n  <li>Cldfire<\/li>\n  <li>Corbin Uselton<\/li>\n  <li>Corey Farwell<\/li>\n  <li>Craig Disselkoen<\/li>\n  <li>Dan Fockler<\/li>\n  <li>Dan Reeves<\/li>\n  <li>Daniel Gollahon<\/li>\n  <li>Daniele Esposti<\/li>\n  <li>Danielle Pham<\/li>\n  <li>Darren Tsung<\/li>\n  <li>David Flemstr\u00f6m<\/li>\n  <li>David McNeil<\/li>\n  <li>David O\u2019Connor<\/li>\n  <li>DebugSteven<\/li>\n  <li>Dimitrii Nemkov<\/li>\n  <li>Dmitry Kashitsyn<\/li>\n  <li>Eduard Kyvenko<\/li>\n  <li>Erick Tryzelaar<\/li>\n  <li>Erika Kloss<\/li>\n  <li>Evan Shaw<\/li>\n  <li>Felix Sch\u00fctt<\/li>\n  <li>Florian Gilcher<\/li>\n  <li>Frank Hassanabad<\/li>\n  <li>Frazer McLean<\/li>\n  <li>Gergely Nagy<\/li>\n  <li>Guy Waldman<\/li>\n  <li>Hendrik Sollich<\/li>\n  <li>Henrik Sj\u00f6\u00f6h<\/li>\n  <li>Herman J. Radtke III<\/li>\n  <li>Hidehito Yabuuchi<\/li>\n  <li>Ian Duke<\/li>\n  <li>Ian McIntyre<\/li>\n  <li>Ingvar Stepanyan<\/li>\n  <li>Ioannis Valasakis<\/li>\n  <li>Ivan Enderlin<\/li>\n  <li>J. Ryan Stinnett<\/li>\n  <li>Jamen Marz<\/li>\n  <li>Jamie Kyle<\/li>\n  <li>Jan Willem Henckel<\/li>\n  <li>Jan-Erik Rediger<\/li>\n  <li>Jannik Keye<\/li>\n  <li>Jason Davies<\/li>\n  <li>Jason Wohlgemuth<\/li>\n  <li>Jesper H\u00e5kansson<\/li>\n  <li>Jim Blandy<\/li>\n  <li>Joel Gallant<\/li>\n  <li>Johann Hofmann<\/li>\n  <li>Johannes Henninger<\/li>\n  <li>John Lewis<\/li>\n  <li>Jonas Trollvik<\/li>\n  <li>Jonathan Kingston<\/li>\n  <li>Jonathan Sundqvist<\/li>\n  <li>Josh Triplett<\/li>\n  <li>Joshua Liebow-Feeser<\/li>\n  <li>Joshua Sheard<\/li>\n  <li>Josmar Dias<\/li>\n  <li>Jo\u00e3o Lucas Lucchetta<\/li>\n  <li>Julius Rakow<\/li>\n  <li>Junjie Huang<\/li>\n  <li>Katharina Fey<\/li>\n  <li>Kevin Hoffman<\/li>\n  <li>Kirill Bulatov<\/li>\n  <li>Kyle Lin<\/li>\n  <li>Lachezar Lechev<\/li>\n  <li>Laurentiu Nicola<\/li>\n  <li>Liigo Zhuang<\/li>\n  <li>LongYinan<\/li>\n  <li>Luke Wagner<\/li>\n  <li>Mackenzie Clark<\/li>\n  <li>Mackiovello<\/li>\n  <li>Manas Karekar<\/li>\n  <li>Marcin Baraniecki<\/li>\n  <li>Mario Reder<\/li>\n  <li>Mark Andrus Roberts<\/li>\n  <li>Mark Hintz<\/li>\n  <li>Markus Stange<\/li>\n  <li>Mason Stallmo<\/li>\n  <li>Matias Insaurralde<\/li>\n  <li>Matt Harrison<\/li>\n  <li>Matt Howell<\/li>\n  <li>Matt Kraai<\/li>\n  <li>Matt Long<\/li>\n  <li>MaxD \/ vj userZero<\/li>\n  <li>MaxXor<\/li>\n  <li>Michael Gattozzi<\/li>\n  <li>Michael Gerhaeuser<\/li>\n  <li>Michael Hoffmann<\/li>\n  <li>Mirclus<\/li>\n  <li>Nathan Froyd<\/li>\n  <li>Nick Fitzgerald<\/li>\n  <li>Nik Graf<\/li>\n  <li>Nikolay Volf<\/li>\n  <li>Noah Lemen<\/li>\n  <li>Noumir Poutipou<\/li>\n  <li>OJ Kwon<\/li>\n  <li>Pascal Brandt<\/li>\n  <li>Pascal Hertleif<\/li>\n  <li>Pat Hickey<\/li>\n  <li>Peter Trotman<\/li>\n  <li>R. Andrew Ohana<\/li>\n  <li>Rahul Sharma<\/li>\n  <li>Ralph Giles<\/li>\n  <li>Ren\u00e9e Kooi<\/li>\n  <li>Ricardo Ambrogi<\/li>\n  <li>Richard Dodd (dodj)<\/li>\n  <li>Robert Masen<\/li>\n  <li>Roberto Huertas<\/li>\n  <li>Rongjian Zhang<\/li>\n  <li>Ruben Schmidmeister<\/li>\n  <li>Ryan Levick<\/li>\n  <li>Sallar Kaboli<\/li>\n  <li>Santiago Pastorino<\/li>\n  <li>Satoshi Amemiya<\/li>\n  <li>Scott Johnson<\/li>\n  <li>Sebastian K\u00f6ln<\/li>\n  <li>Sendil Kumar N<\/li>\n  <li>Sergey Pepyakin<\/li>\n  <li>Sharad Chand<\/li>\n  <li>Sonny Scroggin<\/li>\n  <li>Sophie Alpert<\/li>\n  <li>Spencer Wilson<\/li>\n  <li>Stefan Novak<\/li>\n  <li>Stefan Zimmermann<\/li>\n  <li>Stephan Renatus<\/li>\n  <li>Stephan Wolski<\/li>\n  <li>Steve Klabnik<\/li>\n  <li>Sven Sauleau<\/li>\n  <li>T. Nagasawa<\/li>\n  <li>Tao He<\/li>\n  <li>Ted Mielczarek<\/li>\n  <li>Theemathas Chirananthavat<\/li>\n  <li>Thiago Pontes<\/li>\n  <li>Thomas Eizinger<\/li>\n  <li>Tim Ryan<\/li>\n  <li>Tobias Bieniek<\/li>\n  <li>Tomohide Takao<\/li>\n  <li>Tom\u00e1\u0161 H\u00fcbelbauer<\/li>\n  <li>Tyler Laing<\/li>\n  <li>Tyler Wilcock<\/li>\n  <li>William Lundstedt<\/li>\n  <li>YUyz<\/li>\n  <li>Yoshua Wuyts<\/li>\n  <li>Yury Delendik<\/li>\n  <li>Yuval Kohavi<\/li>\n  <li>Zachary Pierce<\/li>\n  <li>Zack Pierce<\/li>\n  <li>afdw<\/li>\n  <li>alkahest<\/li>\n  <li>andy-bell<\/li>\n  <li>arjunyel<\/li>\n  <li>ashley williams<\/li>\n  <li>belfz<\/li>\n  <li>bokuweb<\/li>\n  <li>bspeice<\/li>\n  <li>csmoe<\/li>\n  <li>data-pup<\/li>\n  <li>dependabot[bot]<\/li>\n  <li>frankhassanbad<\/li>\n  <li>gaurikholkar<\/li>\n  <li>gnzlbg<\/li>\n  <li>huangjj27<\/li>\n  <li>janczer<\/li>\n  <li>johnthagen<\/li>\n  <li>kohensu<\/li>\n  <li>konstin<\/li>\n  <li>kryptan<\/li>\n  <li>kzvi<\/li>\n  <li>limira<\/li>\n  <li>na-g<\/li>\n  <li>pup<\/li>\n  <li>robert masen<\/li>\n  <li>robertdurst<\/li>\n  <li>sarahmeyer<\/li>\n  <li>sepiropht<\/li>\n  <li>sigmaSd<\/li>\n  <li>soryrawyer<\/li>\n  <li>teovoinea<\/li>\n  <li>toversus<\/li>\n  <li>twilco<\/li>\n  <li>xeqlol<\/li>\n<\/ul>","author":{"name":{}},"summary":"\ud83c\udf89 The 2018 edition of Rust has officially shipped, and the initial Rust and WebAssembly development story along with it! \ud83c\udf89"},{"title":"This Week in Rust and WebAssembly 009","link":{"@attributes":{"href":"https:\/\/rustwasm.github.io\/2018\/11\/28\/this-week-in-rust-wasm-009.html","rel":"alternate","type":"text\/html","title":"This Week in Rust and WebAssembly 009"}},"published":"2018-11-28T00:00:00+00:00","updated":"2018-11-28T00:00:00+00:00","id":"https:\/\/rustwasm.github.io\/2018\/11\/28\/this-week-in-rust-wasm-009","content":"<p>Hello and welcome to another issue of <em>This Week in Rust and WebAssembly<\/em>!<\/p>\n\n<p><a href=\"https:\/\/rust-lang.org\">Rust<\/a> is a systems language pursuing the trifecta: safety, concurrency, and speed.<\/p>\n\n<p><a href=\"http:\/\/webassembly.org\">WebAssembly<\/a> is a stack-based virtual machine and instruction set. It is fast, safe, portable, and part of the open Web platform. By compiling to WebAssembly, we can run Rust code on the Web!<\/p>\n\n<p>This is a weekly summary of Rust and WebAssembly\u2019s progress and community.<\/p>\n\n<p>Did we miss something? Tweet to us at <a href=\"https:\/\/twitter.com\/rustwasm\">@rustwasm<\/a> or <a href=\"https:\/\/github.com\/rustwasm\/rustwasm.github.io\">send us a pull request<\/a>.<\/p>\n\n<p><strong>Want to get involved in Rust and WebAssembly? <a href=\"https:\/\/github.com\/rustwasm\/team\/blob\/master\/README.md#get-involved\">Join the Rust and WebAssembly working group!<\/a><\/strong><\/p>\n\n<!-- TODO: check recent r\/rust and users.rust-lang.org posts for \"wasm\" and \"webassembly: -->\n<!-- https:\/\/github.com\/rustwasm\/team\/issues\/79 -->\n<!-- https:\/\/www.reddit.com\/r\/rust\/search?q=wasm&sort=relevance&restrict_sr=on&t=month -->\n<!-- https:\/\/www.reddit.com\/r\/rust\/search?q=webassembly&restrict_sr=on&sort=relevance&t=month -->\n<!-- https:\/\/users.rust-lang.org\/search?q=wasm%20after%3A2018-06-01 -->\n<!-- https:\/\/users.rust-lang.org\/search?q=webassembly%20after%3A2018-06-01 -->\n\n<h2 id=\"news-and-blog-posts\">News and Blog Posts<\/h2>\n\n<p><em>Want to make sure something ends up in this list on the next This Week in Rust and WebAssembly?\n<a href=\"https:\/\/github.com\/rustwasm\/team\/issues\/79\">Leave a comment on this issue.<\/a><\/em><\/p>\n\n<ul>\n  <li><strong><a href=\"https:\/\/rustwasm.github.io\/2018\/10\/24\/multithreading-rust-and-wasm.html\">Multithreading Rust and WebAssembly<\/a><\/strong><\/li>\n  <li><a href=\"https:\/\/sharadchand.com\/2018\/10\/03\/ruukh-framework.html\">Introducing the Ruukh Framework.<\/a> An experimental next-gen frontend framework for the Web in Rust. <a href=\"https:\/\/github.com\/csharad\/ruukh\/\">GitHub repository.<\/a><\/li>\n  <li>The new website for the <code class=\"highlighter-rouge\">pest<\/code> PEG parser generator has a nice wasm-based try-it-live demo at the bottom: https:\/\/pest.rs\/<\/li>\n  <li><a href=\"https:\/\/frehberg.wordpress.com\/webassembly-and-dynamic-memory\/\">WebAssembly and Dynamic Memory.<\/a> A comparison of portability of allocators for wasm, featuring <code class=\"highlighter-rouge\">wee_alloc<\/code>.<\/li>\n  <li><a href=\"https:\/\/crates.io\/crates\/simi\">Simi<\/a> is a new, simple framework for building wasm-front-end Web application in Rust.<\/li>\n  <li><a href=\"https:\/\/sterlingdemille.com\/encrusted\/\">Encrusted<\/a> is an interpreter for Infocom-era interactive fiction games like Zork that runs in your browser and is built with Rust and WebAssembly.<\/li>\n  <li><a href=\"https:\/\/egghead.io\/courses\/using-webassembly-with-rust\">Using WebAssembly with Rust<\/a> is a new, free Video Course on Egghead.<\/li>\n  <li><a href=\"https:\/\/github.com\/Pauan\/SaltyBetBot\"><code class=\"highlighter-rouge\">Pauan\/SaltyBetBot<\/code><\/a> is a SaltyBet Bot written entirely in Rust and <code class=\"highlighter-rouge\">stdweb<\/code> and compiled to Wasm.<\/li>\n  <li><a href=\"https:\/\/blog.scottlogic.com\/2018\/10\/18\/serverless-rust.html\">Serverless Rust with AWS Lambda and WebAssembly<\/a><\/li>\n  <li><a href=\"https:\/\/blog.cloudflare.com\/cloudflare-workers-as-a-serverless-rust-platform\/\">Serverless Rust with Cloudflare Workers and WebAssembly<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/Hywan\/php-ext-wasm\"><code class=\"highlighter-rouge\">php-ext-wasm<\/code><\/a> is a PHP extension written in C, calling a Rust lib through FFI, using <code class=\"highlighter-rouge\">wasmi<\/code> behind the scene.<\/li>\n  <li><a href=\"https:\/\/www.reddit.com\/r\/rust\/comments\/9t95fd\/howto_setting_up_webassembly_on_stable_rust\/\">HOWTO: Setting up WebAssembly on stable Rust without rustup.<\/a> Instructions on using raw Rust and Wasm if you happen not to have <code class=\"highlighter-rouge\">rustup<\/code> available.<\/li>\n  <li><a href=\"https:\/\/github.com\/wasmerio\/wasmer\">Wasmer<\/a> is a WebAssembly runtime built on top of Cranelift.<\/li>\n  <li><a href=\"https:\/\/wasm.fastlylabs.com\/\">Terrarium<\/a> is a fork of <a href=\"https:\/\/webassembly.studio\/\">WebAssembly Studio<\/a>, except rather than run WebAssembly in your browser, it is deployed to a fastly server.<\/li>\n  <li><a href=\"https:\/\/github.com\/Vurich\/runwasm\"><code class=\"highlighter-rouge\">runwasm<\/code><\/a> is an Emscripten emulation layer built with <code class=\"highlighter-rouge\">wasmi<\/code>.<\/li>\n  <li><a href=\"https:\/\/sindrejohansen.no\/blog\/willow\/rust\/elm\/2018\/11\/16\/willow-elm-in-rust.html\">Bringing Elm\u2019s architecture to Rust and Webassembly<\/a><\/li>\n  <li><a href=\"https:\/\/cs242.stanford.edu\/\">Stanford\u2019s CS 242 Programming Languages Class<\/a> will feature Rust and WebAssembly.<\/li>\n  <li><a href=\"https:\/\/pragprog.com\/book\/khrust\/programming-webassembly-with-rust\">The \u201cProgramming WebAssembly with Rust\u201d book<\/a> by Kevin Hoffman and published by Pragmatic Programmers is in beta and available for pre-order.<\/li>\n  <li><a href=\"https:\/\/github.com\/yiransheng\/rust-snake-wasm\"><code class=\"highlighter-rouge\">yiransheng\/rust-snake-wasm<\/code><\/a> is a snake game in Rust and WebAssembly.<\/li>\n  <li><a href=\"https:\/\/crates.io\/crates\/console-web\"><code class=\"highlighter-rouge\">console-web<\/code><\/a> is a crate for writing to the console in wasm using <code class=\"highlighter-rouge\">wasm-bindgen<\/code>.<\/li>\n<\/ul>\n\n<h2 id=\"updates-from-rustwasm\">Updates from <a href=\"https:\/\/github.com\/rustwasm\"><code class=\"highlighter-rouge\">rustwasm\/*<\/code><\/a><\/h2>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/wasm-bindgen\/blob\/master\/CHANGELOG.md#0228\"><code class=\"highlighter-rouge\">wasm-bindgen<\/code> 0.2.28 released! \ud83c\udf89<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/wasm-pack\/blob\/master\/CHANGELOG.md#-051\"><code class=\"highlighter-rouge\">wasm-pack<\/code> 0.5.1 released! \ud83c\udf89<\/a><\/li>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/twiggy\/blob\/master\/CHANGELOG.md#030\">Twiggy 0.3.0 released! \ud83c\udf89<\/a><\/li>\n  <li>There are two new reference sections in the Rust and Wasm book:\n    <ol>\n      <li><a href=\"https:\/\/rustwasm.github.io\/book\/reference\/which-crates-work-with-wasm.html\">Which Crates Will Work with Rust and WebAssembly?<\/a><\/li>\n      <li><a href=\"https:\/\/rustwasm.github.io\/book\/reference\/add-wasm-support-to-crate.html\">How to Add WebAssembly Support to a General-Purpose Crate<\/a><\/li>\n    <\/ol>\n  <\/li>\n<\/ul>\n\n<h2 id=\"requests-for-contribution\">Requests for Contribution<\/h2>\n\n<ul>\n  <li><a href=\"https:\/\/github.com\/rustwasm\/team\/blob\/master\/README.md#get-involved\"><strong>Join the Rust and WebAssembly Working Group!<\/strong><\/a>\n    <ul>\n      <li><a href=\"https:\/\/github.com\/issues?q=is%3Aopen+is%3Aissue+user%3Arustwasm+archived%3Afalse+label%3A%22good+first+issue%22\">All issues labeled \u201cgood first issue\u201d in the <code class=\"highlighter-rouge\">rustwasm\/*<\/code> repositories<\/a><\/li>\n      <li><a href=\"https:\/\/github.com\/issues?q=is%3Aopen+is%3Aissue+user%3Arustwasm+archived%3Afalse+label%3A%22help+wanted%22\">All issues labeled \u201chelp wanted\u201d in the <code class=\"highlighter-rouge\">rustwasm\/*<\/code> repositories<\/a><\/li>\n    <\/ul>\n  <\/li>\n<\/ul>\n\n<h2 id=\"jobs\">Jobs<\/h2>\n\n<ul>\n  <li><a href=\"https:\/\/www.fastly.com\/about\/jobs\/apply?gh_jid=1320541\">Fastly is hiring<\/a> for work on their native WebAssembly compiler, which is written in Rust, based on <a href=\"https:\/\/github.com\/CraneStation\/cranelift\">Cranelift<\/a><\/li>\n<\/ul>\n\n<!-- ## `rustwasm` Projects Activity -->\n\n<!-- Recently merged pull requests to projects in the [`rustwasm` GitHub -->\n<!-- organization][rustwasm-org]: -->\n\n<!-- [rustwasm-org]: https:\/\/github.com\/rustwasm -->\n\n<!-- TODO: insert the output of `pulls_since -o rustwasm -s dd.mm.yyyy` here, where -->\n<!-- \"dd.mm.yyyy\" is the date the *last* newsletter was published. See -->\n<!-- https:\/\/github.com\/budziq\/pulls_since or run `cargo install pulls_since`. -->","author":{"name":{}},"summary":"Hello and welcome to another issue of This Week in Rust and WebAssembly!"}]}