Update on PNaCl support

769 views
Skip to first unread message

Derek Schuff

unread,
Nov 30, 2018, 4:09:12 PM11/30/18
to native-cli...@googlegroups.com
Last year we announced our intention to phase out PNaCl support from the open web in early 2018.  We put those plans on hold to ensure that we first had a viable threads implementation available in WebAssembly.  As of Chrome 70, thread support is now available for developers to try.

With that milestone in place, we are now revising the deprecation timeline and setting Q2’2019 as the formal target to remove support for PNaCl from web content.  We will continue to support PNaCl in Chrome Apps and Extensions beyond that date and will make a separate announcement should those support plans change.

We recognize that technology migrations can be challenging. To help ease the transition we have prepared a set of recommendations for existing PNaCl implementations to migrate to the web platform.  As you embark on the migration process, please let us know if you run into any challenges, so that we can help make the shift as smooth as possible.


Derek Schuff, Software Engineer on NaCl, PNaCl, and WebAssembly

Per Lundberg

unread,
Dec 3, 2018, 8:17:04 AM12/3/18
to native-cli...@googlegroups.com
Hi Derek and others,

On 11/30/18 11:08 PM, 'Derek Schuff' via Native-Client-Discuss wrote:

> With that milestone in place, we are now revising the deprecation
> timeline and setting Q2’2019 as the formal target to remove support for
> PNaCl from web content.  We will continue to support PNaCl in Chrome
> Apps and Extensions beyond that date and will make a separate
> announcement should those support plans change.

Worth mentioning here is the deprecation of _some_ of the PNaCl APIs
that *will* affect apps and extensions also. This is a message that
appears with current versions of Chrome for a certain 3rd party
extension that we use (and rely on) in my company:

[Deprecation] The Native Client Pepper WebSocket API is deprecated
and will be disabled in M74, mid-2019

Here is the accompanying Chromium issue:
https://bugs.chromium.org/p/chromium/issues/detail?id=870586

So, some questions around this:

- Do these plans still hold, i.e. can we expect the PNaCL Pepper
WebSocket API to disappear in M74?

- Are there any other API:s that can be expected to disappear in the
near time frame? (say, within the next 12 months)

Best regards,
--
Per Lundberg

Key Zhu

unread,
Dec 13, 2018, 8:33:04 PM12/13/18
to Native-Client-Discuss
What about NaCl for Chrome App? We highly depend on NaCl threads, OpenGLES, TCP/UDP sockets, SSE2 instructions support ... these are not availabe in WebAssembly.

Soeren Balko

unread,
Mar 8, 2019, 10:39:24 PM3/8/19
to Native-Client-Discuss
You can get a form of POSIX threads support through Emscripten and WebAssembly, which relies on SharedArrayBuffers backing the WebAssembly.Memory object. That being said, WebAssembly's threads approach is clunky to say the least and Emscripten's approach on it is not currently documented very well. We had to hack the Emscripten SDK in a few places to make it work for us.

It took me a couple of days to get it to work and the performance it not remotely at what we were used to from PNaCl. This is mostly due to the fact that WebAssembly relies on Web workers and the aforementioned SharedArrayBuffer in conjunction with the Atomics API to implement the memory model and synchronization primitives of threads. In my view, this is a questionable architectural decision with several drawbacks. What used to be a single .pexe file with inbuilt multithreading will now require separate files for the Emscripten runtime (Javascript), a thread bootstrapper script (Javascript), the WebAssembly file as such, and a static memory file. This added complexity is much harder to manage. Other than that. firing up a new worker instance is expensive, introducing a severe performance penalty to "warm up" the threads and load the Emscripten runtime into each of them.

I hope that WebAssembly eventually receives native threads support, much like PNaCl. Their roadmap does not indicate this to happen anytime soon though. On the flipside, WebAssembly's upcoming SIMD support looks very promising and much more complete than PNaCls rudimentary form of SIMD support. They even have "wide" (256 bit) SIMD support on their roadmap. Then again, WebAssembly standardisation is painstakingly slow. Even threads are still behind a flag in Chrome. 

Dan Chan

unread,
Jun 17, 2019, 7:01:21 PM6/17/19
to Native-Client-Discuss
Just found that PNaCl project can not be run with the current Beta release channel of Chrome. Is PNaCl support going to be disabled in next release? If so the current PNaCl users would experience a major loss in performance, since WebAssembly support is not on par with PNaCl yet.

According to our current experience, threaded WebAssembly is around 50% slower than PNaCl for complex rendering (nonthreaded WebAssembly can be far worse). In addition, its threading support is not mature yet and has some critical issues that block its adoption.



Dan
Reply all
Reply to author
Forward
0 new messages