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

Emscripten

Now that we know what LLVM is, we can discuss Emscripten. Emscripten was developed to compile LLVM IR into JavaScript, but has recently been updated to compile LLVM into WebAssembly. The idea is that, when you get the LLVM compiler working, you can have the benefit of all the languages that compile to LLVM IR. In practice, the WebAssembly specification is still in its early days and does not support common language features such as GC. Therefore, only non-GC languages such as C/C++ and Rust are currently supported. WebAssembly is still in the early MVP phase of its development, but the addition of GC and other common language features are coming soon. When that happens, there should be an explosion of programming languages that will compile to WebAssembly.

When Emscripten was released in 2012, it was intended to be an LLVM-to-JavaScript compiler. In 2013, support was added for asm.js, which is a faster, easily optimized subset of the JavaScript language. In 2015, Emscripten began to add support for LLVM-to-WebAssembly compiling. Emscripten also provides a Software Development Kit (SDK) for both C++ and JavaScript that provides glue code to give users better tools for interaction between JavaScript and WebAssembly than those currently offered by the WebAssembly MVP alone. Emscripten also integrates with a C/C++-to-LLVM compiler called Clang, so that you can compile your C++ into WebAssembly. In addition, Emscripten will generate the HTML and JavaScript glue code you need to get your project started.

Emscripten is a very dynamic project and changes to the toolchain happen frequently. To stay up to date with the latest changes in Emscripten, visit the project home page at  https://emscripten.org.
主站蜘蛛池模板: 崇义县| 舟曲县| 平山县| 苗栗市| 龙岩市| 普兰县| 正蓝旗| 涟源市| 祥云县| 和静县| 维西| 太仆寺旗| 陆河县| 四川省| 民勤县| 绥德县| 策勒县| 峨山| 陇西县| 日喀则市| 会宁县| 乌恰县| 自贡市| 潮州市| 朝阳县| 郴州市| 苏尼特左旗| 平果县| 云和县| 宁晋县| 浦北县| 东宁县| 台湾省| 中江县| 乌兰浩特市| 稷山县| 浦县| 上高县| 湟源县| 丹阳市| 西青区|