Google has been making a lot of fuss over Native Client, which has recently been enabled in Google Chrome, most likely for good reason. The tool enables developers to port existing native code to the web with minimal work. There are already several games in the Chrome Web Store that take advantage of the technology.
Partly as a case study, Google decided to port the MAME emulator to Native Client. Google's Robert Muth details the effort so that other developers may learn techniques and get ideas for their own projects.
Muth encountered several issues along the way, to be expected with a complex project such as MAME. He took several shortcuts, such as dropping support for some CPU emulation and not using OpenGL capabilities, since Native Client only supports the simpler OpenGL ES.
But the
entire thing only took him four days at the end of which, MAME run inside Chrome and was able to run about 75 percent of the games the regular version supports.