Loading…
CppCon 2021 has ended
Back To Schedule
Wednesday, October 27 • 7:45am - 8:45am
Typescripten: Generating Type-safe JavaScript Bindings for emscripten

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
WebAssembly has become a very popular target platform for C++ developers. Thanks to emscripten, porting native applications to WebAssembly is easy — as long as the application only uses the browser as a display and input device. However, emscripten does not provide type-safe wrappers to the standard JavaScript APIs such as the DOM manipulation API, let alone any other JavaScript API provided by existing web applications.

Our open source tool “typescripten” has been built on top of three powerful technologies to close this gap. It uses TypeScript interface definition files and the TypeScript compiler API to create type-safe C++ wrappers based on emscripten. TypeScript already has interface definition files for over 7000 JavaScript libraries that you can now use safely from C++.

We strive to design our C++ wrappers such that the C++ code using them looks similar to the equivalent TypeScript or JavaScript code. However, the peculiar semantics of prototype-based Javascript and Typescript are often difficult to translate into a type-based language such as C++. I will discuss the challenges we faced and choices we made when designing this framework.

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Sebastian  Theophil

Sebastian Theophil

Senior Software Engineer, think-cell
Sebastian studied Computer Science in Berlin and Toulouse, France, and holds a Ph.D. in Computer Science from the Humboldt University of Berlin. He has been working at think-cell Software since its founding in 2002. Over the years, Sebastian has worked on a lot of things at think-cell... Read More →


Wednesday October 27, 2021 7:45am - 8:45am MDT