admin管理员组文章数量:1391989
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 piler, 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
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 piler, 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
Share Improve this question edited Nov 28, 2011 at 5:53 Mr.T.K 2,3467 gold badges26 silver badges44 bronze badges asked Jun 12, 2011 at 7:35 HepticHeptic 3,1064 gold badges33 silver badges53 bronze badges 6- 4 Take a look at Portable Native Client project (PNaCl). – arrowd Commented Jun 12, 2011 at 9:11
- 3 Mind that LLVM IR is not platform-independent at all. – SK-logic Commented Jun 12, 2011 at 11:27
- Any advance on this? it seems interesting, for the PoC emscripten seems to be a good option. – Jorge E. Cardona Commented Nov 28, 2011 at 5:15
- I indeed like the idea of yours, but I believe asking "how" is a wrong way. If someone knew how to do it, they would have done it, or published their designs. If you want to do this, you need to do some research, and when you e up with a technical problem that you don't know how to solve, then e and ask. – Kos Commented Feb 9, 2012 at 14:27
- 1 You can pare differences between Dartium and Chromium. dartlang/tools/dartium – Ginden Commented Jan 29, 2015 at 14:04
1 Answer
Reset to default 3Emscripten 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 ponents 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's game archives.
本文标签: How to replace browser javascript engine with LLVMStack Overflow
版权声明:本文标题:How to replace browser javascript engine with LLVM? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744757634a2623557.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论