vm running in javascript. in a browser. wait, what?

The place for technology related posts.

Moderator: Moderators

Post Reply
User avatar
complacent
DCAWD Founding Member
Posts: 11651
Joined: Sun Aug 29, 2004 8:00 pm
Location: near the rockies. very.
Contact:

vm running in javascript. in a browser. wait, what?

Post by complacent »

linky
French developer Fabrice Bellard has built a JavaScript-based x86 PC emulator capable of running Linux inside a web browser.

If you’d like to try it out, point Firefox 4 or Chrome 11 to the demo page. Keep in mind that this is just Linux, no X Window or other graphical interface, just the command line, a small C compiler and QEmacs, Bellard’s emacs clone. Still, it’s really Linux, really running in your web browser, really using JavaScript to emulate hardware.

For more info on how Bellard did it, as well as what the hardware emulator supports, see Bellard’s technical notes.

Because the hardware emulation is built around the Typed Array spec, Bellard’s Linux experiment only works in those browsers that support JavaScript typed arrays, namely Firefox 4+ and Chrome 11+ (though a bug in Chrome 12 prevents it from working in the latest version of Chrome ).

Bellard is probably best known for founding the FFMPEG project, but unlike that very useful project, Bellard says his JavaScript-based Linux experiment has no real goals. “I did it for fun,” writes Bellard, “just because newer Javascript Engines are fast enough to do complicated things.”

That said, Bellard does have a few possible uses in mind, including serving as a benchmark for JavaScript performance (how fast can your JavaScript engine boot Linux?), client-side processing and perhaps, with a few improvements, running old DOS games and other software in the browser.


this is surprisingly fast. check out the demo here. alas, the only network adapter was lo. i really wanted to view a webpage, in a vm, on a webpage. :(
colin

a tank, a yammie, a spaceship
i <3 teh 00ntz
User avatar
Sabre
DCAWD Founding Member
Posts: 21432
Joined: Wed Aug 11, 2004 8:00 pm
Location: Springfield, VA
Contact:

Re: vm running in javascript. in a browser. wait, what?

Post by Sabre »

That's pretty freaking cool. The linux is VERY stripped down, but who cares: It works.
Sabre (Julian)
Image
92.5% Stock 04 STI
Good choice putting $4,000 rims on your 1990 Honda Civic. That's like Betty White going out and getting her tits done.
User avatar
complacent
DCAWD Founding Member
Posts: 11651
Joined: Sun Aug 29, 2004 8:00 pm
Location: near the rockies. very.
Contact:

Re: vm running in javascript. in a browser. wait, what?

Post by complacent »

Sabre wrote:That's pretty freaking cool. The linux is VERY stripped down, but who cares: It works.
i was impressed that it had as much in /bin and /sbin that it did.

and besides, it was the cuuute-ist widdle fstab evAr!

okay. that was very nerdy. sorry.
colin

a tank, a yammie, a spaceship
i <3 teh 00ntz
User avatar
ElZorro
DCAWD Founding Member
Posts: 5958
Joined: Thu Aug 12, 2004 8:00 pm
Location: USA! USA!

Re: vm running in javascript. in a browser. wait, what?

Post by ElZorro »

i love this stuff :) this is even better than the crazy nested VMs folks were doing with VMware and Virtualbox.
Jason "El Zorro" Fox
'17 Subaru Forester 2.0XT
DCAWD - old coots in fast scoots.
Post Reply