3

用于 Web 的 C++ 编译器

 2 years ago
source link: https://www.oschina.net/p/cheerp
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

用于 Web 的 C++ 编译器

Cheerp 是一个基于 LLVM monorepo 的 C++ 编译器,允许将 C/C++ 代码编译为 WebAssembly 和 JavaScript。

Cheerp 基于并集成到 LLVM/clang 基础架构,具有许多自定义优化步骤,拥有强大的 JavaScript-C++ 互操作性、对异常和 ES6 模块的支持,以及基于 LLVM 的 clang 构建的性能和代码生成能力,可以最大限度地提高性能并最小化编译后的 JavaScript/WebAssembly 输出的大小

Cheerp 主要用于将现有的 C/C++ 库和应用程序移植到 HTML5,但也可用于从头开始编写高性能 Web 应用程序和 WebAssembly 组件。

独特之处:

  1. 生成更快的 WebAssembly 代码,也可以编译为具有动态内存(垃圾收集输出)、零开销 DOM 操作和访问 WebApis 以及卓越的 C++-JavaScript 互操作性的 JavaScript 输出。
  2. 允许将单个代码库编译为 WebAssembly 和 JavaScript 的组合,方法是(可选)使用[[cheerp::genericjs]]和标记代码部分[[cheerp::wasm]]
  3. 生成更小的 WebAssembly 输出。
展开阅读全文

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK