- Hands-On Game Development with WebAssembly
- Rick Battagline
- 451字
- 2021-06-24 13:40:59
Why do we need WebAssembly?
JavaScript has been around for a long time. It has evolved from a little scripting language that allowed bells and whistles to be added to a web page, to a sprawling JIT compiled language with a massive ecosystem that can be used to write fully fledged applications. Today, JavaScript is doing a lot of things that were probably never imagined when it was created by Netscape in 1995. JavaScript is an interpreted language, meaning that it must be parsed, compiled, and optimized on the fly. JavaScript is also a dynamically typed language, which creates headaches for an optimizer.
WebAssembly solves a lot of the problems created by JavaScript and its long history in the browser. Because the JavaScript engine is already in bytecode format, it does not need to run a parser, which removes a significant bottleneck in the execution of our application. This design also allows the JavaScript engine to know what data types it is dealing with at all times. The bytecode makes optimization a lot easier. The format allows multiple threads in the browsers to work on compiling and optimizing different parts of the code at the same time.
WebAssembly is not a high-level programming language, but a binary file with opcodes for a virtual machine. Currently, it is considered to be in an MVP stage of development. The technology is still in its infancy, but even now it offers notable performance and file size benefits for many use cases, such as game development. Because of the current limitations of WebAssembly, we have only two choices for languages to use for its development—C/C++ or Rust. The long-term plan for WebAssembly is to support a wide selection of programming languages for its development. If I wanted to write at the lowest level of abstraction, I could write everything in Web Assembly Text (WAT), but WAT was developed as a language to support debugging and testing and was not intended to be used by developers for writing applications.
- Learning AngularJS Animations
- Augmented Reality with Kinect
- 新型電腦主板關鍵電路維修圖冊
- Linux KVM虛擬化架構實戰(zhàn)指南
- 電腦軟硬件維修大全(實例精華版)
- Intel FPGA/CPLD設計(高級篇)
- micro:bit魔法修煉之Mpython初體驗
- 從零開始學51單片機C語言
- Learning Stencyl 3.x Game Development Beginner's Guide
- 微軟互聯(lián)網(wǎng)信息服務(IIS)最佳實踐 (微軟技術開發(fā)者叢書)
- 面向對象分析與設計(第3版)(修訂版)
- Hands-On Motion Graphics with Adobe After Effects CC
- Blender Game Engine:Beginner's Guide
- Blender for Video Production Quick Start Guide
- MicroPython Cookbook