Take it with a grain of salt
A few weeks ago, Paul blogged about the Lighthouse project. The unofficial goal of that project is to allow every Qt developer to port Qt to their favorite platform. Of course we like it when new platforms come along so we can put Lighthouse through its paces and share their experience. Google’s open source Native Client project seemed like a perfect opportunity. I’ve been playing with it on my creative fridays, and here’s what I’ve got so far:

The industry standard Qt porting example, wiggly widget, in action.
Native Client (NaCl for short) is a carefully sandboxed browser plug-in framework, for running native x86 (and ARM) code in a web browser, in a native execution sandbox completely isolated from the host’s regular processes or the browser itself. That makes it quite different from ActiveX or Netscape plug-ins, which run as regular programs in the browser’s main thread. Security implications of programs running under NaCl are similar to those for JavaScript programs - which means it’s ok to deploy NaCl programs without even telling the user, just like JavaScript.
From a developer’s perspective NaCl can be viewed as a very small operating system, with a cross-compiling GCC toolchain, some POSIX support, and a basic multimedia interface for keyboard and mouse events, audio and video. In addition you can access the browser to read or modify the web page the plugin is embedded in, so everything you can do from JavaScript, you can also do from NaCl.
The security part of NaCl is implemented as a code scanner/verifier, which runs when a program is loaded into NaCl, and makes sure the code being loaded does not contain any unsafe instruction sequences, eg jumps to arbitrary memory locations or self-modifying code. The compiler itself is not a part of the security system, it’s merely a help to produce a valid instruction stream that won’t be rejected by the scanner. This NaCl research paper has all the details.
So how did it go with Lighthouse? Pretty good! We’re not finished yet, but we got some real chemistry :) with NaCl , really quickly. I especially enjoyed working with the new QWindowSurface and QGraphicsSystem classes, which allowed me to fill in the blanks with Native Client API calls and get results on screen right away.
The elastic nodes example running in Firefox
At this point, Qt for NaCl is at the level that QtCore and QtGui compiles with a minimum system-dependencies configuration. The event loop is up and running, with timers, mouse and half-way working keyboard input support. There is one font available (Native Client does not seem to have a font API yet, so each application has to bring their own fonts.) Several widgets work, as well as QGraphicsView (there seems to be an issue with pixmaps not showing up though). The QPainter rasterizer triggers an optimizer bug in the NaCl compiler, so I’ve left optimizations disabled for now. QThread should work, although we are still using the generic mutex-based QAtomic fallback, so multi-threaded performance might not be that great. Finally, NaCl event handling seems to be polling-based only, which means that all applications spin at 100% CPU usage - not quite our preferred style.
So, nice results for Lighthouse, but still work to do.
Want to try it out? Download Native Client, clone the Qt for NaCl git repository, and see the readme-nacl file in the root Qt directory for further instructions. Enjoy!
More on Qt
- Security advisory: Multiple third-party Chromium vulnerabilities fixed in Chrome 153.0.8010.52 impact Qt WebEngine
- Security advisory: Multiple third-party Chromium vulnerabilities fixed in Chrome 154.0.8037.93 impact Qt WebEngine
- Security advisory: CVE-2026-118968: Denial-of-service vulnerability in WAV audio decoding impacts Qt