PNaCl:Google通过LLVM增强对Chrome中原生应用的支持
2023-09-27 14:26:37 时间
作者 Abel Avram ,译者 臧秀涛 发布于
五月 20, 2013
通过支持运行LLVM位码(bitcode),Google增强了对Chrome中原生应用的支持。 在Google I/O 2013大会上,Google宣布了预期加入的PNaCl(Portable NaCl,读作“pinnacle”),继续推进对Chrome中原生应用的支持。PNaCl修改了原来的工具链,与之前为每种目标平台编译C/C++应用不同,现在开发者只需生成一份LLVM位码,之后位码可以由任一Chrome客户端加载,在本地转换为原生代码、验证和执行。 目前,x86-32、x86-64和ARM架构上的Chrome 29已支持PNaCl。在PNaCl完整发布之后,Chrome客户端能够在任意页面上运行原生模块,而无需将其打包为面向Chrome Web Store的应用。此外,PNaCl模块无需重新编译即可在未来的架构上运行。更为有趣的是,尽管目前只支持C/C++,理论上PNaCl模块可以以任何能够编译为LLVM位码的语言编写,包括ActionScript、Ada、D、Fortran、Haskell、Java字节码、Objective-C、Python、Ruby、Rust、Scala和C#等,拓宽了可以在Chrome中运行的遗留的和较新的原生应用的使用范围,这些应用只需要很小的调整,甚至无需调整。 2010年,4位Google工程师组成的一个团队在内部提出了PnaCl(PDF),几位作者想象的是这样一种解决方案:
为编译的NaCl模块提供一种独立于指令集体系结构(ISA)的格式,无需重新编译即可支持多种目标平台。 便于NaCl开发者构建、测试和部署可移植的执行模块。 首先要支持x86-32、x86-64和ARM指令集,但要很容易支持未来其他流行的通用处理器。 能够保持原生客户端所拥有的安全和性能属性。 PNaCl仍然使用原来的NaCl沙盒机制,以保证运行翻译位码时的安全性。具体逻辑如下图所示,客户端从服务器请求位码,然后针对自己的架构将其转换为原生的可执行代码。翻译可能在本地进行(在另一个NaCI沙盒内),也可能通过另一个实体远程执行。 PnaCl开发工具链支持Windows、Mac和Linux,SDK可以从项目网站下载。 查看英文原文:PNaCl: Google Adds More Native Support to Chrome via LLVM
Portable Native Client (PNaCl) 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, PNaCl development uses an LLVM compiler infrastructure 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 Clients POSIX-like environment and the Pepper API for media interfaces, PNaCl provides complete platform independence. With PNaCl, developers can create a single executable for all users. Because translation happens at the client, developers get the benefit of translations for new architectures, as 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. For background information about PNacl, see PNaCl: Portable Native Client Executables (PDF). For current release information, see the release notes.
Google Chrome不仅仅是浏览器 作为一名开发者,选择一个好的开发工具可以起到事半功倍的作用,正所谓:工欲善其事必先利其器!Google Chrome作为广大网民的一款首选浏览器,又不仅仅局限于浏览器,还自带或扩展了很多协助开发人员的插件和工具,帮助开发者们大大的提高了开发效率和便利。
如何通过Google Chrome远程控制你的Windows 10系统 Google提供了一个免费而又强大的工具--Chrome远程桌面(Chrome Remote Desktop),来允许你连接并控制互联网上的Windows 10电脑系统(这同样适用于Windows 7和8)。根据本文介绍的步骤,你可以在家里或办公室的Windows 10系统上通过设置Chrome远程桌面,来借助互联网进行连接和控制了。
snsn1984 多年研发和团队管理经验,熟悉LLVM、GPU等技术领域,具备公司层面技术管理能力。
通过支持运行LLVM位码(bitcode),Google增强了对Chrome中原生应用的支持。 在Google I/O 2013大会上,Google宣布了预期加入的PNaCl(Portable NaCl,读作“pinnacle”),继续推进对Chrome中原生应用的支持。PNaCl修改了原来的工具链,与之前为每种目标平台编译C/C++应用不同,现在开发者只需生成一份LLVM位码,之后位码可以由任一Chrome客户端加载,在本地转换为原生代码、验证和执行。 目前,x86-32、x86-64和ARM架构上的Chrome 29已支持PNaCl。在PNaCl完整发布之后,Chrome客户端能够在任意页面上运行原生模块,而无需将其打包为面向Chrome Web Store的应用。此外,PNaCl模块无需重新编译即可在未来的架构上运行。更为有趣的是,尽管目前只支持C/C++,理论上PNaCl模块可以以任何能够编译为LLVM位码的语言编写,包括ActionScript、Ada、D、Fortran、Haskell、Java字节码、Objective-C、Python、Ruby、Rust、Scala和C#等,拓宽了可以在Chrome中运行的遗留的和较新的原生应用的使用范围,这些应用只需要很小的调整,甚至无需调整。 2010年,4位Google工程师组成的一个团队在内部提出了PnaCl(PDF),几位作者想象的是这样一种解决方案:
为编译的NaCl模块提供一种独立于指令集体系结构(ISA)的格式,无需重新编译即可支持多种目标平台。 便于NaCl开发者构建、测试和部署可移植的执行模块。 首先要支持x86-32、x86-64和ARM指令集,但要很容易支持未来其他流行的通用处理器。 能够保持原生客户端所拥有的安全和性能属性。 PNaCl仍然使用原来的NaCl沙盒机制,以保证运行翻译位码时的安全性。具体逻辑如下图所示,客户端从服务器请求位码,然后针对自己的架构将其转换为原生的可执行代码。翻译可能在本地进行(在另一个NaCI沙盒内),也可能通过另一个实体远程执行。 PnaCl开发工具链支持Windows、Mac和Linux,SDK可以从项目网站下载。 查看英文原文:PNaCl: Google Adds More Native Support to Chrome via LLVM
Portable Native Client (PNaCl) 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, PNaCl development uses an LLVM compiler infrastructure 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 Clients POSIX-like environment and the Pepper API for media interfaces, PNaCl provides complete platform independence. With PNaCl, developers can create a single executable for all users. Because translation happens at the client, developers get the benefit of translations for new architectures, as 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. For background information about PNacl, see PNaCl: Portable Native Client Executables (PDF). For current release information, see the release notes.
Google Chrome不仅仅是浏览器 作为一名开发者,选择一个好的开发工具可以起到事半功倍的作用,正所谓:工欲善其事必先利其器!Google Chrome作为广大网民的一款首选浏览器,又不仅仅局限于浏览器,还自带或扩展了很多协助开发人员的插件和工具,帮助开发者们大大的提高了开发效率和便利。
如何通过Google Chrome远程控制你的Windows 10系统 Google提供了一个免费而又强大的工具--Chrome远程桌面(Chrome Remote Desktop),来允许你连接并控制互联网上的Windows 10电脑系统(这同样适用于Windows 7和8)。根据本文介绍的步骤,你可以在家里或办公室的Windows 10系统上通过设置Chrome远程桌面,来借助互联网进行连接和控制了。
snsn1984 多年研发和团队管理经验,熟悉LLVM、GPU等技术领域,具备公司层面技术管理能力。
相关文章
- Google Earth Engine(GEE)APP ——分辨率可视化和比较墨西哥湾北部和佛罗里达州湿地地区的土地覆盖变化和数字高程模型(DEM)
- Google Earth Engine——土地覆盖变化极简介绍
- Google Earth Engine(GEE)—geemap映射到图像集合(map)
- Google Earth Engine 教程——如何建立新的影像投影后将其每个矢量格网转化为栅格?
- Google Earth Engine(GEE)——MOD17A3中Npp_QC波段展示(北京市案例分析)
- Google Earth Engine(GEE)——图像位移与配准!
- Google Earth Engine(GEE)——提取点的栅格值(相当于值提取至点)part1
- Google Earth Engine(GEE) ——从河流到海洋的塑料输入量数据集
- Google Earth Engine(GEE)——全球基于MODIS的月度雪盖值(2000-2020年)
- Google Earth Engine——使用可见光红外成像辐射仪套件(VIIRS)日/夜波段(DNB)的夜间数据的月平均辐射度合成图像。
- Google Earth Engine ——MOD09A1 V6产品提供了Terra MODIS 1-7带500米分辨率的表面光谱反射率的估计,并对大气条件如气体、气溶胶和瑞利散射进行了校正!
- Google Earth Engine ——全球JRC/GSW1_2/MonthlyHistory数据集的观测数据
- 进一步部署 Google Authenticator:Apache 模块
- 小技巧:如何在 Kali Linux 中安装 Google Chrome 浏览器
- 快来参加Chrome浏览器性能挑战赛,免费去美国参加Google I/O 大会!
- Google play安装不上Chrome
- 解决高版本 Google Chrome 扩展程序强制停用问题 -摘自网络
- 其它 Google Chrome 已停止工作
- 解析Amazon和Google语音平台之争的商业逻辑