Duetto: A C++ compiler for the Web going beyond emscripten and node.js
Learning Technologies Ltd. has released a new Clang-based C++ compiler for the Web:
Duetto: a C++ compiler for the Web going beyond emscripten and node.js
From the announcement:
Today Leaning Technologies Ltd. releases duetto, a compiler designed to develop integrated (backend and frontend) web applications in C++. duetto is now available to the public as FOSS here, and will be offered in a commercial package with closed-source-friendly licensing soon.
[... duetto] allows to program both the frontend and the backend of a Web application in an integrated C++ codebase, compiling them respectively to JavaScript and native code.
Duetto combines the advantages of emscripten and node.js by allowing the programmer to:
- write web applications in C++, reusing existing code and making porting of whole applications and games to the browser plausible.
- code both the frontend and the backend of a web application in the same language and codebase
In addition to this, duetto provides some nice features:
- Bring the robustness and proven scalability of C++ programming to the Web
- You can access all browser APIs directly. Duetto inherits the C++ philosophy of exposing the platform capabilities (and limitations) to the users. There is no middle man.
- Duetto is based on LLVM/clang. An industry standard C++ compiler is a programmer’s best friend: code sanity is verified as compile time, including RPC signatures.
- The LLVM toolchain also guarantees that a mind-blowing set of optimizations is run at compile time, generating highly efficient code. This decreases the burden on JavaScript JIT compiler at runtime.
- Contrarily to emscripten we do not try to emulate a traditional address space using typed arrays, but directly map C++ objects to JS objects. This reduces memory consumption since the garbage collector can delete unused object.