7 ms·
This company has an x86-to-WASM compiler that lets you execute arbitrary binaries in the browser. Also a JVM to WASM transpiler. There's a fantastic Meetup pr
by gavinray 5y ago
This company has an x86-to-WASM compiler that lets you execute arbitrary binaries in the browser.
Also a JVM to WASM transpiler.
There's a fantastic Meetup presentation given by one of them where they show running a C++ multiplayer game with both client AND server running in a browser, using WebRTC as a networking polyfill. Really mindblowing:
https://youtu.be/7JUs4c99-mo?t=167 https://youtu.be/7JUs4c99-mo?t=167
- mysterydip 5y ago> running a C++ multiplayer game with both client AND server running in a browser, using WebRTC as a networking polyfill Ok, now you have my attention. Been waiting for that possibility for a while!
- yuri91 5y agoIf you are interested, here is the article I wrote about that particular project: https://medium.com/leaningtech/porting-a-c-multiplayer-game-to-the-web-with-cheerp-webrtc-and-firebase-29fbbc62c5ca https://medium.com/leaningtech/porting-a-c-multiplayer-game-...
- apignotti 5y ago> This company has an x86-to-WASM compiler that lets you execute arbitrary binaries in the browser. Direct link to our latest demo in case anybody would like to see this tech in action: https://webvm.io https://webvm.io
- zeusk 5y agoAt what point does the browser become an "os", what's next? Chrome hypervisor?
- dmitrygr 5y agoIt happened about a decade ago.
- tentacleuno 5y agoNot sure what you mean by hypervisor, but Microsoft does have... Microsoft Defender Application Guard, I believe it's called. It's a totally sandboxed version of Edge.
- runeks 5y ago> At what point does the browser become an "os", what's next? When it no longer requires an OS to run.
- enos_feedler 5y agoSo ChromeOS
- runeks 5y agoChromeOS is Linux
- sva_ 5y agoI'd be much more willing to execute some binary in my browser than directly on my OS. Sure, you could do a VM or so, but a browser tab is spun up much more quickly. The absence of friction of just executing something quickly, and being able to share it with a single text string, is what makes this appealing to people, I reckon. I dunno why people seemingly get offended by this.
- unnouinceput 5y agoThis sounds like ActiveX. Security issues related to ActiveX are solved or not? Because if they are not, then it's just a reskin of ActiveX and malware authors gonna have a field day.
- apignotti 5y agoThere is a very big difference: ActiveX was native code that was literally running on your system with full access to system calls. CheerpX is a Virtual Machine environment, it JIT compiles Wasm code from x86 binaries and it is fully sandboxed by the browser. It _cannot_ access your system even if it tried.
- pjmlp 5y agoIt can still be exploited the Applets/Flash way, by forcing the internal memory to become corrupted and with it change its behaviour.
- nynx 5y agoIt literally cannot.
- sfink 5y agoRight, you can corrupt memory and thereby alter behavior, but that memory is a managed array. You can't corrupt anything outside of the application's own memory. As you say, you can change behavior, and thereby do whatever you want with whatever the wasm application is allowed to access. Which is a very limited set of things. Likening it to Java applets or Flash is deceptive -- yes, you can still hack them and exploit vulnerabilities. But the scope of what you can do with such vulnerabilities is wildly, dramatically different. Even when sandboxed, Flash has an enormously wider attack surface to play with. WebAssembly has barely anything. It's like the difference between patching a leak in your roof with a sponge vs tar paper. In theory, water could find a path through the tar paper.
- fsiefken 5y agoWhat would the impact be on battery life compared to native execution? Can one get it just as power efficient as native execution, only slower? For computationally less intensive applications browser portability might be an excellent tradeoff. It gives a new meaning to the slogan "write once, run everywhere".
- eklitzke 5y agoGenerally things that run faster are more power efficient, because the CPU has to run for less time to do the same work. There might be a few odd exceptions here and there, e.g. certain AVX instructions can use a lot of power, but they're not common.
- mhh__ 5y agoThose AVX instructions use more power at least in part because they massively better utilize the silicon, so you're making a tradeoff between speed and efficiency as per usual.
- deathanatos 5y agoSorry, but to be pedantic for a second: do they consume more energy, which is really what I care about for battery life? (Let's assume I'm committed to asking the machine to do whatever work it is that I asked it to do, so the required computation is constant, for discussion.) My understanding of AVX is that it consumes more power, yes — but the point the parent makes is a good one: if it finishes faster, where does the energy use come out? More power over less time can mean less energy. (Or more. Depends on the additional power vs. the time saved…)
- mhh__ 5y ago1. This all depends massively on the actual workload and chip, a lot of people are basically winging it when it comes to AVX power consumption stories. The rub is also that, especially on laptops, you can get convexity in all the scaling problems e.g. you do more work, good, but then the laptop throttles then stays throttled for a while etc. 2. The original (real) power issues with the original/early AVX-512 desktop chips have basically gone away. It's not far off the timescale that you'd looking back to be bashing AMD for bulldozer. I'd measure it for you on my machine but I don't have an accurate power-o-meter for my computer.