官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 沾化县| 白银市| 长宁区| 达孜县| 云南省| 锦屏县| 开封县| 桃江县| 依兰县| 翁牛特旗| 太仆寺旗| 当雄县| 恩平市| 互助| 资阳市| 福清市| 普定县| 黎川县| 开鲁县| 张家界市| 嘉荫县| 台山市| 迭部县| 蚌埠市| 桂平市| 沿河| 商城县| 精河县| 甘孜县| 上饶县| 洪江市| 嘉禾县| 琼海市| 乐业县| 万州区| 仲巴县| 上思县| 临颍县| 宣恩县| 临邑县| 芦溪县|