Google's Native Client browser tech now works on ARM

Next up: making it work on every CPU


Updated Native Client (NaCl), the Google technology that allows developers to write client-side web application modules in compiled languages like C and C++, has been updated to work on devices based on the ARM processor architecture.

Earlier versions of the technology, which enables running native binary code inside a browser window, have only supported modules compiled for Intel processors.

As of Tuesday, however, the Native Client SDK now includes an additional set of compilers and other tools that can be used to build NaCl modules for ARM devices.

"Just get the newest SDK, and you'll have all the tools you need," Google's David Sehr wrote in an official blog post on Tuesday.

Getting NaCl working on more kinds of devices is an important goal for Google. Not only does NaCl allow developers to run high-performance code in the browser, but Google has also positioned the technology as one replacement for the legacy NSAPI browser plug-in interface, which has remained largely unchanged since the early days of Netscape.

NaCl modules are written in compiled languages and they have low-level access to browser APIs, which sounds scary to some. But traditional browser plug-ins can actually make system calls, which is even less safe, and Google says NaCl's sophisticated sandboxing techniques make NaCl modules more secure than earlier in-browser native code technologies, such as Microsoft's ActiveX.

So far, however, Google's own Chrome is the only browser to support NaCl modules natively. Early builds of NaCl worked with Firefox and other browsers via a plug-in, but the Mozilla Foundation has said it is "not interested" in working on NaCl or its related Pepper API, preferring to concentrate on improving the performance of Firefox's JavaScript runtime.

Still, Google says that as long as developers are content with targeting Chrome, they should have no problem building NaCl modules that work on both Intel and ARM processors – that is, provided they stick to using the Newlib standard C library, rather than the more heavyweight glibc.

Building the ARM modules requires an extra compilation step, and developers will need to tweak their NaCl module manifests to support the new architecture – but that isn't anything new. Because NaCl modules are native binary code, developers already need to build separate modules for 32-bit and 64-bit Intel processors.

That could change in the near future, though. Google's Sehr says that Portable Native Client, a new version of NaCl that builds its modules on the fly from machine-independent LLVM compiler bitcode, will arrive this year. That version will allow the same modules to run on 32-bit Intel, 64-bit Intel, ARM, or any other processor architecture that can run Chrome with NaCl.

There is another catch, however. Developers can build NaCl modules for ARM today, but like plug-ins, NaCl isn't supported on Chrome for Android. That means the only ARM devices currently compatible with NaCl modules are the ARM-powered Chromebooks, plus the odd Linux device running a custom build of Chromium. You can't run native code in your phone's browser, and from the look of things, that isn't likely to change anytime soon. ®

Update

We have made some minor corrections to this article after further clarification from Google staffers. In particular, the original version of the article said that the Firefox browser supported NaCl via a plug-in; this was once true, but it's no longer the case. In addition, we have clarified our explanation of how NaCl modules relate to traditional browser plug-ins in terms of security. We regret any confusion the earlier version of the article may have caused.


Other stories you might like

  • Now that's wafer thin: Some manufacturers had less than five days of chip supplies, says Uncle Sam

    Components fabbed using 40nm-plus process nodes hit hard

    Hardware manufacturers hit hardest by the global semiconductor shortage had less than five days of chips in their inventories last year – and should expect supply chain issues to continue throughout 2022 – the US Department of Commerce said this week.

    Demand for semiconductors skyrocketed during the pandemic as folks purchased more PCs, laptops, and tablets to work or learn from home, and cloud giants scaled up their backend systems to cope. Supply, however, couldn't keep up. The median inventory of semiconductor buyers in 2019 was 40 days of supply. By 2021 that figure was down to less than five days for certain key US sectors, the department said in a report, while demand was up 17 per cent.

    Production was initially slowed at factories around the world due to shelter-at-home orders as the coronavirus pandemic took hold. Some facilities had to temporarily shut down after they were hit with natural disasters, such as fires and snowstorms. But between Q2 2020 and the end of 2021 fabs were operating at over 90 per cent capacity and still couldn't meet global demand.

    Continue reading
  • Baidu's AI predictions for 2022: Autonomous driving! Quantum computing! Space! Human-machine symbiosis!

    Did a computer program tell them to write this?

    Baidu Research's AI-centric "Top 10 Tech Trends in 2022" report has outlined the Middle Kingdom megacorp's predictions for technology over the coming year.

    Baidu CTO Haifeng Wang describes AI as a "key driving force of innovation and development," thanks to rapidly evolving core technologies, cross-domain connectivity, and expanding applications.

    It's no surprise that the list focuses on AI given Baidu's business domain. The Beijing-based company's search engine captures over 70 per cent of the Chinese market while also developing other products, particularly AI research and cloud computing. The research arm takes a deeper look at its associated technologies. Think Google but Chinese.

    Continue reading
  • Nvidia reportedly prepares for un-Arm'd fight with rivals: $40bn takeover may be abandoned

    Softbank, meanwhile, remains 'hopeful' it can offload Brit chip designer

    Nvidia is quietly preparing to give up on the purchase of Arm, according to Bloomberg, after repeatedly butting heads with competition regulators amid a wave of opposition from the tech industry.

    A report by the newswire states Nvidia privately told its partners it does not expect the Arm transaction to close. The report also claims Arm's current owner SoftBank is pressing ahead with an IPO of Arm.

    The $40bn bid Nvidia lodged for Arm in September 2020 has proved controversial: Arm licences its chip designs to multiple clients and some felt that buying the company will give Nvidia the power to stifle competition.

    Continue reading

Biting the hand that feeds IT © 1998–2022