Typescripten: Generating Type-safe JavaScript Bindings for emscripten
summary
Generates type-safe C++ wrappers from TypeScript declaration files using the TypeScript compiler API and targets emscripten via emscripten/embind so JavaScript APIs (7000+ libraries) become callable from C++; claims preserve idiomatic C++ shapes, handle generics and many unions, and the tool is self-hosting. Demonstrated embedding a Tableau visualization and a DOM-based demo; live demo hiccups occurred but core workflow works. Notes a measurable runtime cost from string-based marshaling and plans to reduce that overhead.
AI-written summary · about
chapters (17)
- 0:00Start
- 3:24Sorting in Javascript Array
- 6:18Write a Web Application in C
- 7:03Webassembly
- 7:25Introduction to Webassembly
- 11:59Runtime Support
- 22:41Interface Definitions
- 23:14Type Definition Libraries
- 27:42Valid Typescript
- 28:58Typescript Constructs
- 35:31Mixed Enumerations
- 36:28Function Callbacks
- 38:19Create a Javascript Function Object
- 44:35Detached Function
- 46:25Generic Classes
- 53:00Open Challenges
- 53:27Questions
related talks
45mEmscripten
43mCompiling TypeScript
28mBringing a Mobile C++ Codebase to the Web
30mRust in the Browser for Javascripters:New Frontiers,New Possibilities
32mC++ Everywhere with WebAssembly
29mAssemblyScript: TypeScript on Steroids Thanks to WebAssembly?
38mModeling Symposium
22mBeyond JavaScript: The languages for the modern Web
