- Learn WebAssembly
- Mike Rourke
- 246字
- 2021-08-13 15:38:49
Where can I use it?
WebAssembly's official site has an extensive list of potential use cases. I'm not going to cover them all here, but there are several that represent significant enhancements to the capabilities of the web platform:
- Image/video editing
- Games
- Music applications (streaming, caching)
- Image recognition
- Live video augmentation
- VR and augmented reality
Although some of these use cases are technically feasible with JavaScript, HTML, and CSS, using WebAssembly can offer significant performance gains. Serving up a binary file (instead of a single JavaScript file) can greatly reduce the bundle size, and instantiating the Wasm module on page load speeds up code execution.
WebAssembly isn't just limited to the browser. Outside the browser, you could use it to build hybrid native apps on mobile devices or perform server-side computations of untrusted code. Using Wasm modules for phone apps could be incredibly beneficial in terms of power usage and performance.
WebAssembly also offers flexibility with regard to how it can be used. You can write your entire code base in WebAssembly, although this may not be practical in its current form or in the context of a web application. Given WebAssembly's robust JavaScript API, you could write the UI in JavaScript/HTML and use Wasm modules for functionality that doesn't directly access the DOM. Once additional languages are supported, objects can be easily passed between the Wasm module and JavaScript code, which will greatly simplify integration and increase developer adoption.
- Building a RESTful Web Service with Spring
- Scala Design Patterns
- R語言數(shù)據(jù)可視化之美:專業(yè)圖表繪制指南
- Responsive Web Design with HTML5 and CSS3
- 鋒利的SQL(第2版)
- 琢石成器:Windows環(huán)境下32位匯編語言程序設(shè)計
- RealSenseTM互動開發(fā)實戰(zhàn)
- Learning jQuery(Fourth Edition)
- Visual Basic程序設(shè)計(第三版)
- App Inventor 2 Essentials
- Mastering Concurrency in Python
- UI設(shè)計基礎(chǔ)培訓(xùn)教程(全彩版)
- Python 快速入門(第3版)
- JavaWeb從入門到精通(視頻實戰(zhàn)版)
- Visual FoxPro數(shù)據(jù)庫程序設(shè)計