Learn WebAssembly
上QQ阅读APP看书,第一时间看更新

What is WasmFiddle?

WasmFiddle, located at https://wasdk.github.io/WasmFiddle/, is an online code editing tool that allows you to write some C or C++ code and convert it to Wat, compile it to Wasm, or interact with it directly using JavaScript. The C/C++ and JavaScript editors are minimal and aren't intended to be used as your primary development environment, but it offers a valuable service in the Wasm compiler. In Chapter 3Setting Up A Development Environment, you'll discover that going from square one to generating Wasm files requires a little bit of work—being able to paste your C code into the browser and hitting a couple of buttons makes things much more convenient. The following diagram gives a quick overview of the interface:

Components of the WasmFiddle user interface

As you can see, the interface is relatively simple. Let's try out some code!