返回资讯中心
外部精选
软件工程
#开发者实时流

Examples and information relating to using Web Assembly WAT

This is a collection of WAT code examples and some useful libraries that should help you understand how it all works and encourage you make a start in making something cool for yourself.

Hacker News 最新peter_d_sherman2026/10/18 · 2026/10/183 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

This is a collection of WAT code examples and some useful libraries that should help you understand how it all works and encourage you make a start in making something cool for yourself.

If you are using Visual Studio Code then I recommend using the "WebAssembly" extension. This will highlight WAT file syntax. It can be used to convert a WAT file into WASM, but I do not recommend it.

You will need to download and build the WABT: WebAssembly Binary Toolkit. I did find it tricky to build the applications in Windows, so good luck.

To build WAT files you will need to use the wat2wasm tool. When debugging you may want to include the switch command --debug-names.

You can debug inside the WASM code but it is limited. You will need to put a break point before you call any WASM function, and step into the function. It is very useful, allowing you to see variable values and the stack.

So far, everything is aimed at NodeJS, but it should all work within any modern browser, with one or two adjustments fetching the WASM file.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →