How to replace browser javascript engine with LLVM?

As a proof of concept, I would like to get a browser to be able to run LLVM IR. The basic idea would be that any language with an LLVM compiler, would be able to work as a first class citizen on the net. (Which is why I don’t want to go the LLVM IR -> JS route for anything other than a “fallback”)

The LLVM code should be able to all the same functions (e.g. DOM) with the same restrictions. I’m looking for pointers on getting started, where the best place to dive in is (I have C/C++ experience) and what the easiest browser is going to be to extend.

Ideally I’m looking for something very modular, so this is just another “scripting engine” as is the javascript one, as is any other future ones (e.g. direct python one)

Thanks very much

Emscripten is an LLVM backend targeting asm.js, which may be executed on all major browsers. The project dates back to 2010. This translates the IR into asm.js for you. Ideally you should be able to expand the project to support additional languages as opposed to just C/C++; either that or as a launching pad to put the other components in place prior to writing your bindings for the execution environment against the browser interfaces you desire.

asm.js has been used to run the Unreal engine, along with porting DosBox for Archive.org’s game archives.


The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .
Read More:   Testing if jQueryUI has loaded

Similar Posts