404 Tech Support

Javascript PC Emulator Puts Linux In Your Browser

Mostly for the fun of it, Fabrice Bellard has coded an emulator for Linux completely in Javascript that runs right inside your browser. The Javascript PC Emulator debuted last week and has received additional updates since. It works best in Firefox and Chrome with Opera and IE9 support being recent additions.

The usefulness of an OS in your browser is still being explored but the developer lists these potential uses for it in the emulator’s technical notes:

I did it for fun, just because newer Javascript Engines are fast enough to do complicated things. Real use could be:

  • Benchmarking of Javascript engines (how much time takes your Javascript engine to boot Linux ?). For this particular application, efficient handling of 32 bit signed and unsigned integers and of typed arrays is important.
  • Learning to use command line Unix tools without leaving the browser.
  • Client side processing using an x86 library, for example for cryptographic purposes. For such application, the x86 emulator can be modified to provide an API to load x86 dynamic libraries and to provide a js-ctypes like API to call the C/C++ functions from javascript.
  • A more advanced version would allow to use old DOS PC software such as games.

You’ll find more technical details in the technical notes and the FAQ page for those curious of the architecture behind the emulator.

Check it out and play around with the command line Linux using the Javascript PC Emulator.

Thanks to Michael for the tip.