日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

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

發(fā)布時間:2025/5/22 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 PNaCl:Google通过LLVM增强对Chrome中原生应用的支持 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

作者?Abel Avram?,譯者?臧秀濤?發(fā)布于 五月 20, 2013

通過支持運行LLVM位碼(bitcode),Google增強了對Chrome中原生應(yīng)用的支持。

在Google I/O 2013大會上,Google宣布了預(yù)期加入的PNaCl(Portable NaCl,讀作“pinnacle”),繼續(xù)推進對Chrome中原生應(yīng)用的支持。PNaCl修改了原來的工具鏈,與之前為每種目標平臺編譯C/C++應(yīng)用不同,現(xiàn)在開發(fā)者只需生成一份LLVM位碼,之后位碼可以由任一Chrome客戶端加載,在本地轉(zhuǎn)換為原生代碼、驗證和執(zhí)行。

目前,x86-32、x86-64和ARM架構(gòu)上的Chrome 29已支持PNaCl。在PNaCl完整發(fā)布之后,Chrome客戶端能夠在任意頁面上運行原生模塊,而無需將其打包為面向Chrome Web Store的應(yīng)用。此外,PNaCl模塊無需重新編譯即可在未來的架構(gòu)上運行。更為有趣的是,盡管目前只支持C/C++,理論上PNaCl模塊可以以任何能夠編譯為LLVM位碼的語言編寫,包括ActionScript、Ada、D、Fortran、Haskell、Java字節(jié)碼、Objective-C、Python、Ruby、Rust、Scala和C#等,拓寬了可以在Chrome中運行的遺留的和較新的原生應(yīng)用的使用范圍,這些應(yīng)用只需要很小的調(diào)整,甚至無需調(diào)整。

2010年,4位Google工程師組成的一個團隊在內(nèi)部提出了PnaCl(PDF),幾位作者想象的是這樣一種解決方案:

  • 為編譯的NaCl模塊提供一種獨立于指令集體系結(jié)構(gòu)(ISA)的格式,無需重新編譯即可支持多種目標平臺。
  • 便于NaCl開發(fā)者構(gòu)建、測試和部署可移植的執(zhí)行模塊。
  • 首先要支持x86-32、x86-64和ARM指令集,但要很容易支持未來其他流行的通用處理器。
  • 能夠保持原生客戶端所擁有的安全和性能屬性。

PNaCl仍然使用原來的NaCl沙盒機制,以保證運行翻譯位碼時的安全性。具體邏輯如下圖所示,客戶端從服務(wù)器請求位碼,然后針對自己的架構(gòu)將其轉(zhuǎn)換為原生的可執(zhí)行代碼。翻譯可能在本地進行(在另一個NaCI沙盒內(nèi)),也可能通過另一個實體遠程執(zhí)行。

PnaCl開發(fā)工具鏈支持Windows、Mac和Linux,SDK可以從項目網(wǎng)站下載。

查看英文原文: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 Client's?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.

轉(zhuǎn)載于:https://www.cnblogs.com/ainima/p/6331959.html

總結(jié)

以上是生活随笔為你收集整理的PNaCl:Google通过LLVM增强对Chrome中原生应用的支持的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。