Javascript-based PC emulator, running GNU/Linux

home of a content challenger

Javascript-based PC emulator, running GNU/Linux

This is a verbatim copy of the BoingBoing page, but since this is so significant I don’t care.

Linux running in a javascript window

Linux running in a javascript window

 

Fabrice Bellard has written a 32 bit x86 emulator in Javascript — in plain English, he’s created a virtual PC that runs inside your browser, using Javascript. And then (of course), he created a GNU/Linux variant that can run inside it — so you can run a full-featured PC inside your browser. It’s a pretty fabulous hack and has far-reaching implications: for example, you could theoretically run any program or OS inside your browser, even if you’re using a locked-down platform that won’t let you change the OS or install your own programs. And then there’s stuff like installing MAME in a virtual browser machine, so that you can play all/any retrogames.

What’s the use ?
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.
* 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.

JS Linux

Javascript PC Emulator – Technical Notes

Link (to the boingboing article).

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: