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

Role in the development process

The text format allows for the representation of a binary Wasm module in textual form. This has some profound implications with regard to the ease of development and debugging. Having a textual representation of a WebAssembly module allows developers to view the source of a loaded module in a browser, which eliminates the black-box issues that inhibited the adoption of NaCl. It also allows for tooling to be built around troubleshooting modules. The official website describes the use cases that drove the design of the text format:

? View Source on a WebAssembly module, thus fitting into the Web (where every source can be viewed) in a natural way. 

? Presentation in browser development tools when source maps aren't present (which is necessarily the case with the Minimum Viable Product (MVP)).

? Writing WebAssembly code directly for reasons including pedagogical, experimental, debugging, optimization, and testing of the spec itself.

The last item in the list reflects that the text format isn't intended to be written by hand in the course of normal development, but rather generated from a tool like Emscripten. You probably won't see or manipulate any .wat files when you're generating modules, but you may be viewing them in a debugging context.

Not only is the text format valuable with regards to debugging, but having this intermediate format reduces the amount of reliance on a single tool for compilation. Several different tools currently exist to consume and emit this s-expression syntax, some of which are used by Emscripten to compile your code down to a .wasm file.

主站蜘蛛池模板: 乌拉特中旗| 平乐县| 宁城县| 大兴区| 汝南县| 双桥区| 宜城市| 玉龙| 盱眙县| 贡嘎县| 周口市| 彩票| 霍城县| 金溪县| 剑川县| 肃北| 社会| 西峡县| 昌都县| 清丰县| 大新县| 无极县| 额济纳旗| 巴林左旗| 丹东市| 集安市| 体育| 阜平县| 陵水| 淮南市| 双辽市| 新郑市| 广州市| 时尚| 桃源县| 三明市| 韩城市| 防城港市| 鄂伦春自治旗| 新化县| 施甸县|