I absolutely love the new MDN where every article is just a file on Git. For example, the source for this article is here: https://github.com/mdn/content/blob/main/files/en-us/webasse... You can find the link to the source of any article at the bottom of the page.
WebAssembly
21–30 of 98 posts
Re: WebAssembly
#22I absolutely love the new MDN where every article is just a file on Git. For example, the source for this article is here: https://github.com/mdn/content/blob/main/files/en-us/webasse... You can find the link to the source of any article at the bottom of the page.
It's a pretty common blogging method. Google and many other orgs do that too.
Re: WebAssembly
#23Something that I've been looking for as I try to learn more about WebAssembly is good examples of tasks that, when converted from Javascript to WebAssembly, would be good uses of WebAssembly for performance or memory or other reasons. Does anybody have a link to a blog post or good documentation like that?
Re: WebAssembly
#24I absolutely love the new MDN where every article is just a file on Git. For example, the source for this article is here: https://github.com/mdn/content/blob/main/files/en-us/webasse... You can find the link to the source of any article at the bottom of the page.
It's a pretty common blogging method. Google and many other orgs do that too.
Re: WebAssembly
#25Something that I've been looking for as I try to learn more about WebAssembly is good examples of tasks that, when converted from Javascript to WebAssembly, would be good uses of WebAssembly for performance or memory or other reasons. Does anybody have a link to a blog post or good documentation like that?
Re: WebAssembly
#26Earlier quoted context omitted.
It's a pretty common blogging method. Google and many other orgs do that too.
Is it? Can you provide some links to examples?
Re: WebAssembly
#27Something that I've been looking for as I try to learn more about WebAssembly is good examples of tasks that, when converted from Javascript to WebAssembly, would be good uses of WebAssembly for performance or memory or other reasons. Does anybody have a link to a blog post or good documentation like that?
- An in-browser crossword puzzle generator: https://crossword.paulbutler.org/ (source: https://github.com/paulgb/crossword-composer)
- A multi-player word game: https://redwords.paulbutler.org/
- A library for synchronizing state between clients, used for that word game: https://aper.dev/ (source: https://github.com/aper-dev/aper very WIP right now)
In my experience, the single biggest perk of using WebAssembly is that I can use a language I'm very productive in (Rust) compared to JavaScript. Everything else is secondary. That said, I think these projects have specific advantages by virtue of being WebAssembly:
- The backtracking search used for the crossword puzzle generator is carefully implemented to reduce memory allocations. This would be tough to do in JavaScript, and I believe it's partly responsible for its performance.
- The word game uses a compression algorithm that benefits very noticeably from wasm-opt, to the point that I can't run it without it. Given that wasm-opt takes a non-trivial amount of time at compile time, I suspect the JavaScript JIT would be slow at doing something similar at runtime. This is just conjecture, I haven't checked.
- What Aper does just wouldn't be possible without Rust features like Serde and macros.
Re: WebAssembly
#28Earlier quoted context omitted.
It's a pretty common blogging method. Google and many other orgs do that too.
Is it? Can you provide some links to examples?
Re: WebAssembly
#29Something that I've been looking for as I try to learn more about WebAssembly is good examples of tasks that, when converted from Javascript to WebAssembly, would be good uses of WebAssembly for performance or memory or other reasons. Does anybody have a link to a blog post or good documentation like that?
Re: WebAssembly
#30Something that I've been looking for as I try to learn more about WebAssembly is good examples of tasks that, when converted from Javascript to WebAssembly, would be good uses of WebAssembly for performance or memory or other reasons. Does anybody have a link to a blog post or good documentation like that?
It's a design tool that runs entirely in your browser as a WebAssembly-based frontend tool (coded in C++ IIRC). Go kick the tires and play around with it--you will be amazed how fast, fluid and downright native the experience feels.
IMHO I think we're going to see more and more frontend experiences like this in the near future. For certain classes of complex apps we're starting to see the overhead of all the frontend JS cruft, polyfills, reactivity, etc. are just getting out of hand and destroying browsers on low-spec phones and machines. A little Go/C++/Rust/AssemblyScript, etc. app compiled to WebAssembly interacting with the DOM directly is incredibly fast and space efficient. The build system for something like Go or Rust is so much more sane and easy to use vs. a complex modern JS Webpack setup too.
edit: More details here: https://www.figma.com/blog/webassembly-cut-figmas-load-time-...