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

Portable target for compilation

WebAssembly was designed from the beginning with portability in mind. Portability in this context means that WebAssembly's binary format can be executed efficiently on a variety of operating systems and instruction set architectures, on and off the web. The specification for WebAssembly defines portability in the context of an execution environment. WebAssembly was designed to run efficiently in environments that meet certain characteristics, most of which are related to memory. WebAssembly's portability can also be attributed to the absence of a specific API around the core technologies. Instead, it defines an import mechanism where the set of available imports is defined by the host environment.

In a nutshell, this means that WebAssembly isn't tied to a specific environment, such as the web or desktop. The WebAssembly Working Group has defined a Web API, but that's separate from the Core Specification. The Web API caters to WebAssembly, not the other way around.

The compilation aspect of the definition indicates that WebAssembly will be simple to compile down to its binary format from source code written in high-level languages. The MVP focuses on two languages, C and C++, but Rust can also be used given its similarities to C++. Compilation will be achieved through the use of a Clang/LLVM backend, although we'll be using Emscripten in this book to generate our Wasm modules. The plan is to eventually add support for other languages and compilers (such as GCC), but the MVP is focused on LLVM.

主站蜘蛛池模板: 封丘县| 古丈县| 大竹县| 巨鹿县| 安国市| 贵港市| 上饶市| 肥城市| 敖汉旗| 永胜县| 鄱阳县| 昌都县| 芜湖市| 东丽区| 天门市| 蒙自县| 东至县| 永年县| 安泽县| 连平县| 怀来县| 上思县| 淳化县| 穆棱市| 仁化县| 德钦县| 斗六市| 吴江市| 临朐县| 宁国市| 南宁市| 德格县| 陇南市| 疏勒县| 甘泉县| 达州市| 霍邱县| 金湖县| 秀山| 抚顺县| 滦平县|