Announcement

Collapse
No announcement yet.

CIB: Getting The Clang Compiler To Run In A Web Browser

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • unixfan2001
    replied
    Originally posted by dwagner View Post
    There is, and plenty of it! That VM can output graphics, read keyboard input, read mouse events, read and use an ever-broadening API to browser storage and functionality, including accesses to location, microphones, speakers etc.

    You might assume that the browser is filtering all that stuff properly to keep the user safe, but much better system programmers than those writing browsers have failed numerous times to harden "sandboxes" or "VM"s or whatever you want to call them.

    Fact is: A VM without any possibilities for I/O would be pretty useless. But the more I/O becomes possible from a VM, the more possibilities for security breaches there are.
    The point is you can do all of this without WASM. WASM isn't more or less secure than regular ES5/ES6.
    It can only access regular browser APIs. Nothing more, nothing less. Unlike the likes of "good, old" ActiveX.

    Leave a comment:


  • dwagner
    replied
    Originally posted by unixfan2001 View Post
    WASM is essentially a VM. There's no access to the underlying system.
    There is, and plenty of it! That VM can output graphics, read keyboard input, read mouse events, read and use an ever-broadening API to browser storage and functionality, including accesses to location, microphones, speakers etc.

    You might assume that the browser is filtering all that stuff properly to keep the user safe, but much better system programmers than those writing browsers have failed numerous times to harden "sandboxes" or "VM"s or whatever you want to call them.

    Fact is: A VM without any possibilities for I/O would be pretty useless. But the more I/O becomes possible from a VM, the more possibilities for security breaches there are.

    Leave a comment:


  • paulpach
    replied
    I could see this being useful for making a browser based IDE. Kind of like cloud9 and jsfiddle but for C++.

    Leave a comment:


  • starshipeleven
    replied
    Originally posted by unixfan2001 View Post
    WASM is essentially a VM. There's no access to the underlying system.
    Technically speaking, also Java or Javascript use a VM.
    Did not make them that safe.

    Leave a comment:


  • unixfan2001
    replied
    Originally posted by starshipeleven View Post
    Jeezus Christ on a pogo stick... this is beautiful and scary at the same time.
    Not seeing the "scary" part here.
    Mind elaborating?

    WASM is essentially a VM. There's no access to the underlying system.

    Leave a comment:


  • starshipeleven
    replied
    Jeezus Christ on a pogo stick... this is beautiful and scary at the same time.

    Leave a comment:


  • unixfan2001
    replied
    Originally posted by Space Beer View Post
    Yes, it will run everywhere, but it'll run like sh1t. Not to mention stupid GUI optimized for browsing the web and not some serious CAD or development work
    It will run decent if it's being optimised for it and there's no reason you can't have a more traditional GUI in the browser. Immediate mode is a thing, you know.

    Leave a comment:


  • Space Beer
    replied
    Yes, it will run everywhere, but it'll run like sh1t. Not to mention stupid GUI optimized for browsing the web and not some serious CAD or development work

    Leave a comment:


  • dragorth
    replied
    Originally posted by dwagner View Post
    This is not the first time a generic compiler was made to work inside a browser - the in-browser VMs available at https://bellard.org/jslinux/ used to come with a functional gcc included - here's an archive.org link to an older version from 2012 that was still containing gcc: http://web.archive.org/web/201202290...d.org/jslinux/

    While technically a nice demonstration, I think it is creepy how the common people confuse browsers with operating systems these days, and developers follow suit, emphasizing way too seldom how turning your browser into an operating system will basically lower the safety of your system to that of the browser. It's weird how people think it's safe to automatically execute whatever software they load if only it comes to them via HTTP(S) protocol...
    I agree with the sentiment, but the reality is the web as an OS has one feature that no other OS has. Write once, run anywhere. (You can debate browser versions, but I would simply respond they are akin to Unix distros, i.e. OS X, BSD, Linux, etc..) And it works across almost all of device types. This is no small feat when you consider how many of the devices sold to third world countries are not the classic three that developers have traditionally compiled for.

    This should also stress the WASM system in a new way to help find speed bumps and issues.

    Leave a comment:


  • chithanh
    replied
    Interesting. Maybe this could lead to a browser-based "kill-ryzen" style test, too.

    Leave a comment:

Working...
X