天天看点

PNaCl:Google通过LLVM增强对Chrome中原生应用的支持

五月 20, 2013

通过支持运行LLVM位码(bitcode),Google增强了对Chrome中原生应用的支持。

为编译的NaCl模块提供一种独立于指令集体系结构(ISA)的格式,无需重新编译即可支持多种目标平台。

便于NaCl开发者构建、测试和部署可移植的执行模块。

首先要支持x86-32、x86-64和ARM指令集,但要很容易支持未来其他流行的通用处理器。

能够保持原生客户端所拥有的安全和性能属性。

PNaCl仍然使用原来的NaCl沙盒机制,以保证运行翻译位码时的安全性。具体逻辑如下图所示,客户端从服务器请求位码,然后针对自己的架构将其转换为原生的可执行代码。翻译可能在本地进行(在另一个NaCI沙盒内),也可能通过另一个实体远程执行。

PNaCl:Google通过LLVM增强对Chrome中原生应用的支持

May 15, 2013

Portable Native Client (PNaCl, pronounced "pinnacle"), is an architecture-independent version of Native Client. Traditional C and C++ development uses a "compile → link" workflow that produces a platform- and architecture-dependent executable. In contrast,

with a "compile → link → translate" workflow. This workflow produces a "linked" binary that is provided as intermediate representation (IR) bitcode; the bitcode is then translated locally for a specific end-user system architecture. In conjunction with Native

well as new translation optimizations, for free, as such features become available and without the need to rebuild their applications. Once PNaCl is fully released, users will be able to run PNaCl modules on any web page – applications will not need to be

deployed through the Chrome Web Store in order to run PNaCl modules.