Sign in to follow this  

Compile C++ to JavaScript for Web Pages from Visual Studio?

Recommended Posts


I think some people here might be interested to know about my latest project, called [b]vs-tool[/b]. It is a plugin for Visual Studio 2010 which enables the integration of external compiler/linker toolchains into VS. The hard work was done by Gavin Pugh, the author of [url=""]vs-android[/url], who developed a MSBuild task plugin to allow invoking GCC from VS. For vs-tool, the following toolchains are now supported:

- Build with MinGW: [url=""][/url]

Allows building Windows applications if you have installed the MinGW compiler.

- Build with llvm-clang: [url=""][/url]

Allows compiling with the clang compiler. Note however, that clang does not yet fully support building windows applications, but I have tested that simple hello world code at least builds and runs ok.

- Build with Emscripten: [url=""][/url]

Emscripten is a wonderfully geeky and absurd project, where LLVM bytecode is translated into executable .js for the web. This means one can compile C++ code directly into .js. The project is developed by Alon Zakai from Mozilla, find the homepage at [url=""][/url] , and a technical paper at [url=""]https://raw.github.c.../docs/paper.pdf[/url] . The main motivation that had me start building vs-tool was to add support for Emscripten directly into Visual Studio, which is now working quite nicely (adding MinGW and Clang support was a bit of a side tour). Rather insanely, Emscripten supports translating GLES2 code directly into WebGL code, which allows me to work on converting my Android GLES2 engine directly for the web, from Visual Studio! This is so hackish, insane, fun, and crazy, at the same time.

The homepage for vs-tool is at github: [url=""][/url]

If you give it a go, let me know how it goes!

Share this post

Link to post
Share on other sites
Sign in to follow this