Google Native Client (from wikipedia)
Google Native Client (abbreviated as NaCl as allusion to Sodium chloride or common salt) is a sandboxing technology for running a subset of Intel x86 native code using software-based fault isolation.[1] Currently in an early development stage, it is proposed for safely running native code from a web browser, allowing web-based applications to run at near-native speeds.[2] Native Client is an open source project being developed by Google.[3] To date, Quake and XaoS have been ported to Google Native Client Platform. Native Client is supported on Firefox, Safari, Opera, and Google Chrome running on Windows, Mac, or Linux on x86 hardware.[2]
An ARM implementation is now also available.[4]
The x86 implementation of Native Client is notable for its novel sandboxing technique which makes use of the x86 architecture's rarely-used segmentation facility. Native Client sets up x86 segments to restrict the memory range that the sandboxed code can access. It uses a code verifier to prevent use of unsafe instructions such as instructions that perform system calls. In order to prevent the code from jumping to an unsafe instruction hidden in the middle of a safe instruction, Native Client requires that all indirect jumps be jumps to the start of 32-byte-aligned blocks, and instructions are not allowed to straddle these blocks.[5] Because of these constraints, C code must be recompiled to run under Native Client, which provides customised versions of the GNU toolchain (specifically, gcc and binutils).
Native Client is licensed under a BSD-style license.
Native Client uses Newlib as its C library, but a port of GNU libc is also available.[6]
Wine on Google Native Client
Besides the above NaCl will be supported by Chrome and NaCl applications will be runnable on all platforms that support Chrome, including Chrome OS. NaCl will probably also be supported by Chrome Web Store, but this has not been confirmed yet. Once Native client is rolled out it will reach more then 10% of the usage share, which is Chromes current user base.
It stands to reason that a NaCl port of Wine will reach a large user-base. NaCl is very GNU:ish and Windows developers that want a familiar API may choose to turn to the Wine implementation of Win32 API for this. And with ChromeOS and Chrome Web Store developers will desire to reach this new market.
However we may not be able to support all of Wine on NaCl. I dont know if we will be able to load Windows binaries or if we have to stick to ELF. However on this platform winelib may be enough to gain a notable usage share.
Status
To compile Wine with NaCl you need the NaCl SDK and updated config.sub and config.guess supporting nacl. Actually compile already fails at makedepend because it's using link and unlink. Further the NaCl FAQ says syscalls will not be supported and we use them very often. Using "-lnosys" while linking helps a lot with the link/unlink problem, but later we run into an errno problem.
