top | item 26919360

Boxedwine is an emulator that can run Windows applications in the browser

300 points| danslo | 4 years ago |github.com

71 comments

order

brian_herman|4 years ago

mywacaday|4 years ago

If we are living in a simulation it's slightly more troubling that it might be running in a browser.

josephg|4 years ago

Does it run Firefox? I’d love to see a browser in a browser, just to experience mediocrity in all its awful glory.

Networking would be tricky, but you could encapsulate TCP over a custom websocket tunnel.

ant6n|4 years ago

I think I actually saw this talk live. What are the chances. Definitely worth checking out, it’s pretty fun.

re|4 years ago

Is there a relevant timestamp for those of us not wanting to invest 30 minutes in the full talk?

EvilEy3|4 years ago

What prophesy? It is written in C++.

avidiax|4 years ago

http://www.boxedwine.org/demo/

Very light games are playable. I'm sure that legacy line-of-business software would have zero trouble.

kev_emu|4 years ago

I worked on the emscripten/wasm build of boxedwine. I can answer some questions. The project has been around in some form for 9 years. It was originally in java, then straight c, now c++. Main author previously worked on jdosbox. I previously ported jdosbox to become jsdosbox (via GWT) a decade ago.

arilotter|4 years ago

Wow, I managed to run 3D Pinball Space Cadet at a fluid 60fps with audio disabled. This is a pretty mind-boggling thing to have exist.

fouc|4 years ago

I tried AoE in safari but that didn't work.. works in firefox though

etaioinshrdlu|4 years ago

Am I looking at the source properly? The author made their own multiplatform CPU emulator just for this?

This is not just Qemu running in a browser, folks. Someone put a huge amount of work into this.

heavyset_go|4 years ago

And they're emulating a Linux kernel in order to provide a platform to run Wine on. It's very impressive.

infinityplus1|4 years ago

If it turns out that Win32 APIs+Wine+Javascript is the ultimate cross platform way to run apps, I would laugh my heart out.

DoctorOW|4 years ago

If someone releases an old Windows app for Mac and Linux using this and Electron I hope a story about it reaches HN. It'd be the ultimate combination of tech we love to hate. :)

emayljames|4 years ago

Sounds like virus central. I would have thought having a small Linux in the browser would have been better.

aidanhs|4 years ago

I first came across this a while ago and after digging I found the way it worked (and possibly still works) behind the scenes is pretty cool: https://groups.google.com/g/emscripten-discuss/c/4Qw8OOgTvu0...

> A while ago I was pondering getting emscripten working under Wine, but realised that it's not quite as simple as a typical program (because Wine relies on being able to just provide a compatibility layer for syscalls, so the compatibility layer for x86 would have to be provided by the port to emscripten).

> Seeing this post, I wondered if you'd found some cunning way around this so downloaded the project. No, you've just gone straight ahead and implemented an x86 emulator! Ok, but how is wine able to run on bare metal? Oh right, you've actually implemented parts of linux, including most of the syscall interface, your own executable loader, parts of procfs and assorted special devices! Alright, but (as Alon asks) how does this actually render things? Ah I see, you've implemented your own display driver in Wine which, when methods are invoked, dispatches interrupts to the emulated CPU which then forwards and translates the interrupt to an equivalent sdl call (with opengl working a similar way, but with a dll)!

> Wow!

kev_emu|4 years ago

BoxedWine does OpenGL passthrough on platforms where available. This does not extend to the WASM/WebGL, but I really tried! I was able to get it working for some simple OpenGL applications with help from gl4es, but was unable to make it work with textures beyond one example [1]. I would appreciate some assistance if anyone has the required skills.

[1] - https://kevodwyer.github.io/boxedwine-examples/v1/boxedwine....

etaioinshrdlu|4 years ago

Am I understanding this project correctly that there is no Linux kernel, only a simulation of it?

That alone is quite interesting if true, and probably useful outside of just running Wine.

laumars|4 years ago

As per the linked readme, there is a Linux kernel and it is emulated.

Basically this project is a Linux emulator but rather than exposing libc APIs it exposes Win32 et al via WINE.

Pretty neat idea but comes with all the usual caveats of running Windows software on WINE plus all the new caveats of running C++ in WebAssembly.

Cloudef|4 years ago

Seems so, basically compatibility layer to run another compatibility layer heh

DownwardFall|4 years ago

this is neat! thanks for this! I've been using Shells.com to run windows apps in my browser this gives me some cool ideas for projects..

Thanks!

remix2000|4 years ago

Why WINE on Linux instead of ReactOS? Do browsers have some Linux simulation facilities built-in?

danoon|4 years ago

ReactOS is a full OS, so it needs to run in a VM which requires disk images. Boxedwine emulates everything it needs and can use the users file system directly. So you can just drag a setup or game that doesn't require installation right into the UI and it will work.

fighterpilot|4 years ago

For a Linux user, can someone explain in what situations this is preferable to regular Wine?

anthk|4 years ago

It may run under OpenBSD. Good until thfr fixed the Wine (re)-port for OpenBSD.

I mostly play IF and slashem, but Deus Ex it's game I liked a lot in my teen years.

kinghtown|4 years ago

This finally explains why gutter punks love boxed wine.

nickthemagicman|4 years ago

Just for the record this is the best name ever.

excalibur|4 years ago

Name is perfect

whollacsek|4 years ago

Genius name for a genius project!

zaphirplane|4 years ago

This is impressive and inspiring. I’ll take a look at the code after browsing Reddit