WebAssembly Without Boilerplate
admin last edited by
Else you love modern frontend technologies and practices, and use them to develop web apps offering to your users experiences similar to native ones :
damn fast loading time;
nearly no waiting time or UI freezing during information processing.
Concretely, you’re familiar with the actions below to reach these goals :
using tiny yet powerful frameworks (ex: Preat, Redux, StencilJs, Svelte…);
harnessing the Cache and Service Worker APIs (look for Progressive Web Apps) for offline applications;
avoiding DOM accesses (relatively slow) when not absolutely necessary;
using async patterns (Promises, generators) properly;
not declaring new local variables in frequently called functions to avoid too much triggering of the garbage collector (=> temporary UI freezes);
using native ES6 methods when your application target modern browsers;
using Web Workers - to create additional threads - if some tasks can be executed in parallel;
using WebGL to speed up drawings, or heavy operations (scientific libraries, artificial intelligence...).
Still, your application has some bottlenecks. You’ve heard about the WebAssembly revolution, but the situation is not severe enough to rewrite the whole app from scratch in C++ or Rust - that you don’t know. Indeed, your bundle size is not very big, and instead the problem lies in a dozen of slow functions. Moreover, you want to experiment with the WASM technology without learning lots of tools. Above all, you want clear and succinct explanations but less dry than the official documentation. THIS BOOK IS PROBABLY FOR YOU! Indeed, each chapter show practical examples, that you can test in a few seconds by copying and pasting them into your browser console. Also, code samples are littered with detailed comments! For prerequisites, please check Appendix A.0.