Ts-polyglot
A tool that lets you import C, C++, and Rust files directly into TypeScript and call native functions without manually writing all the bindings, built on the new Content Mappers feature in TypeScript 7.1 beta.
What it addresses
Calling native C/C++/Rust functions from TypeScript required manually writing all the bindings.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
Ts-polyglot
A tool that lets you import C, C++, and Rust files directly into TypeScript and call native functions without manually writing all the bindings, built on the new Content Mappers feature in TypeScript 7.1 beta.
Problem: Calling native C/C++/Rust functions from TypeScript required manually writing all the bindings.
Posted by @emykhailenko · Original source ↗
Story title · @emykhailenko · · Source ↗
Show HN: Ts-polyglot – Call C/C++ or Rust functions directly from TypeScript
Submitted URL · @emykhailenko · · Source ↗
https://ts-polyglot.dev
Source text · @emykhailenko · · Source ↗
import C, C++, Rust files directly into TypeScript and call native functions without manually writing all the bindings
Source text · @emykhailenko · · Source ↗
Experimenting with new Content Mappers feature in TypeScript 7.1 beta
Source text · @emykhailenko · · Source ↗
Technically, something similar was already possible with Volar.js, but TypeScript 7.1 makes the integration much more straightforward.
Story title · @emykhailenko · · Source ↗
Call C/C++ or Rust functions directly from TypeScript